svghmi/widget_animate.ysl2
branchsvghmi
changeset 3232 7bdb766c2a4d
parent 3064 4b44d09c48a7
--- a/svghmi/widget_animate.ysl2	Thu Apr 15 09:15:23 2021 +0200
+++ b/svghmi/widget_animate.ysl2	Sun May 02 23:01:08 2021 +0200
@@ -1,8 +1,7 @@
 // widget_animate.ysl2
 
-template "widget[@type='Animate']", mode="widget_class"{
+widget_class("Animate") {
     ||
-    class AnimateWidget extends Widget{
         frequency = 5;
         speed = 0;
         start = false;
@@ -42,12 +41,6 @@
             let widget_pos = this.element.getBBox();
             this.widget_center = [(widget_pos.x+widget_pos.width/2), (widget_pos.y+widget_pos.height/2)];
         }
-    }
     ||
 }
 
-
-template "widget[@type='Animate']", mode="widget_defs" {
-    param "hmi_element";
-    |,
-}