svghmi/widget_display.ysl2
branchsvghmi
changeset 3232 7bdb766c2a4d
parent 3204 856f4698a0a8
child 3241 fe945f1f48b7
--- a/svghmi/widget_display.ysl2	Thu Apr 15 09:15:23 2021 +0200
+++ b/svghmi/widget_display.ysl2	Sun May 02 23:01:08 2021 +0200
@@ -1,18 +1,16 @@
 // widget_display.ysl2
 
 
-template "widget[@type='Display']", mode="widget_class"
+widget_class("Display")
     ||
-    class DisplayWidget extends Widget{
         frequency = 5;
         dispatch(value, oldval, index) {
             this.fields[index] = value;    
             this.request_animate();
         }
-    }
     ||
 
-template "widget[@type='Display']", mode="widget_defs" {
+widget_defs("Display") {
     param "hmi_element";
 
     const "format" optional_labels("format");