svghmi/widget_animaterotation.ysl2
branchsvghmi
changeset 3232 7bdb766c2a4d
parent 3064 4b44d09c48a7
child 3241 fe945f1f48b7
--- a/svghmi/widget_animaterotation.ysl2	Thu Apr 15 09:15:23 2021 +0200
+++ b/svghmi/widget_animaterotation.ysl2	Sun May 02 23:01:08 2021 +0200
@@ -1,8 +1,7 @@
 // widget_animaterotation.ysl2
 
-template "widget[@type='AnimateRotation']", mode="widget_class"{
+widget_class("AnimateRotation") {
     ||
-    class AnimateRotationWidget extends Widget{
         frequency = 5;
         speed = 0;
         widget_center = undefined;
@@ -40,12 +39,11 @@
             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='AnimateRotation']", mode="widget_defs" {
+widget_defs("AnimateRotation") {
     param "hmi_element";
     |,
 }