svghmi/widget_jump.ysl2
branchsvghmi
changeset 2898 a2910281fcb5
parent 2883 8e3d130399b0
child 2900 3ef217f525ff
--- a/svghmi/widget_jump.ysl2	Wed Mar 25 13:36:04 2020 +0100
+++ b/svghmi/widget_jump.ysl2	Wed Mar 25 13:56:04 2020 +0100
@@ -3,7 +3,8 @@
 template "widget[@type='Jump']", mode="widget_defs" {
     param "hmi_element";
     |     on_click: function(evt) {
-    |         switch_page(this.args[0], this.indexes[0]);
+    |         const index = this.indexes.length > 0 ? this.indexes[0] + this.offset : undefined;
+    |         switch_page(this.args[0], index);
     |     },
     |     init: function() {
     /* registering event this way doies not "click" through svg:use