diff -r 5243c2a2f7f8 -r 7bdb766c2a4d svghmi/widget_animaterotation.ysl2 --- 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"; |, }