svghmi/widget_scrollbar.ysl2
branchsvghmi
changeset 3232 7bdb766c2a4d
parent 3178 21cb76012c78
child 3241 fe945f1f48b7
--- a/svghmi/widget_scrollbar.ysl2	Thu Apr 15 09:15:23 2021 +0200
+++ b/svghmi/widget_scrollbar.ysl2	Sun May 02 23:01:08 2021 +0200
@@ -1,8 +1,7 @@
 // widget_scrollbar.ysl2
 
-template "widget[@type='ScrollBar']", mode="widget_class"{
+widget_class("ScrollBar") {
     ||
-    class ScrollBarWidget extends Widget{
         frequency = 10;
         position = undefined;
         range = undefined;
@@ -89,11 +88,10 @@
             this.dragpos += movement * units / pixels;
             this.apply_position(this.dragpos);
         }
-    }
     ||
 }
 
-template "widget[@type='ScrollBar']", mode="widget_defs" {
+widget_defs("ScrollBar") {
     param "hmi_element";
     labels("cursor range");