svghmi/widget_scrollbar.ysl2
branchsvghmi
changeset 3178 21cb76012c78
parent 3151 8e5d383a58cb
child 3232 7bdb766c2a4d
--- a/svghmi/widget_scrollbar.ysl2	Tue Mar 02 17:30:13 2021 +0100
+++ b/svghmi/widget_scrollbar.ysl2	Wed Mar 03 11:45:13 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){