--- a/svghmi/widget_foreach.ysl2 Thu Apr 15 09:15:23 2021 +0200
+++ b/svghmi/widget_foreach.ysl2 Sun May 02 23:01:08 2021 +0200
@@ -1,5 +1,5 @@
-template "widget[@type='ForEach']", mode="widget_defs" {
+widget_defs("ForEach") {
param "hmi_element";
if "count(path) != 1" error > ForEach widget «$hmi_element/@id» must have one HMI path given.
@@ -49,9 +49,8 @@
| item_offset: 0,
}
-template "widget[@type='ForEach']", mode="widget_class"
+widget_class("ForEach")
||
-class ForEachWidget extends Widget{
unsub_items(){
for(let item of this.items){
@@ -117,6 +116,5 @@
jumps_need_update = true;
requestHMIAnimation();
}
-}
||