svghmi/widget_scrollbar.ysl2
branchsvghmi
changeset 3179 73d26eae5fb1
parent 3178 21cb76012c78
child 3232 7bdb766c2a4d
--- 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){