# HG changeset patch # User Edouard Tisserant # Date 1614933382 -3600 # Node ID 73d26eae5fb1d0c3d890678eba5ee312feffffa3 # Parent 5a8abd549aa815e46b5db617aa6d9a5ab2d146d2# Parent 21cb76012c78ee5c7164c6d9c8ea61dff0cabf44 Merged diff -r 5a8abd549aa8 -r 73d26eae5fb1 svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Fri Mar 05 09:24:45 2021 +0100 +++ b/svghmi/gen_index_xhtml.xslt Fri Mar 05 09:36:22 2021 +0100 @@ -5748,22 +5748,22 @@ case 0: + this.range = Math.max(1,value); + + break; + + case 1: + this.position = value; break; - case 1: - - this.range = Math.max(1,value); + case 2: + + this.size = value; break; - case 2: - - this.size = value; - - break; - } @@ -5834,7 +5834,7 @@ this.position = Math.round(Math.max(Math.min(position, this.range - this.size), 0)); - this.apply_hmi_value(0, this.position); + this.apply_hmi_value(1, this.position); } diff -r 5a8abd549aa8 -r 73d26eae5fb1 svghmi/widget_scrollbar.ysl2 --- a/svghmi/widget_scrollbar.ysl2 Fri Mar 05 09:24:45 2021 +0100 +++ b/svghmi/widget_scrollbar.ysl2 Fri Mar 05 09:36:22 2021 +0100 @@ -12,10 +12,10 @@ dispatch(value,oldval, index) { switch(index) { case 0: - this.position = value; + this.range = Math.max(1,value); break; case 1: - this.range = Math.max(1,value); + this.position = value; break; case 2: this.size = value; @@ -55,7 +55,7 @@ apply_position(position){ this.position = Math.round(Math.max(Math.min(position, this.range - this.size), 0)); - this.apply_hmi_value(0, this.position); + this.apply_hmi_value(1, this.position); } on_page_click(is_up){ diff -r 5a8abd549aa8 -r 73d26eae5fb1 tests/svghmi/svghmi_0@svghmi/svghmi.svg --- a/tests/svghmi/svghmi_0@svghmi/svghmi.svg Fri Mar 05 09:24:45 2021 +0100 +++ b/tests/svghmi/svghmi_0@svghmi/svghmi.svg Fri Mar 05 09:36:22 2021 +0100 @@ -125,11 +125,11 @@ inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:document-units="px" - inkscape:current-layer="g971" + inkscape:current-layer="hmi0" showgrid="false" units="px" inkscape:zoom="0.42177816" - inkscape:cx="-596.64145" + inkscape:cx="-871.66754" inkscape:cy="136.19693" inkscape:window-width="1600" inkscape:window-height="836" @@ -5406,7 +5406,7 @@