SVGHMI : have to move some JS declarations from "preamble" to "declarations" and others from "declarations" to "definitions" section to make room for JS libraries that would be used by widget classes. svghmi
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Thu, 06 Aug 2020 14:59:04 +0200
branchsvghmi
changeset 3007 360300a8b995
parent 3006 bbffdefd2eed
child 3008 dabad70db1bf
SVGHMI : have to move some JS declarations from "preamble" to "declarations" and others from "declarations" to "definitions" section to make room for JS libraries that would be used by widget classes.
svghmi/detachable_pages.ysl2
svghmi/widgets_common.ysl2
--- a/svghmi/detachable_pages.ysl2	Wed Aug 05 18:53:56 2020 +0200
+++ b/svghmi/detachable_pages.ysl2	Thu Aug 06 14:59:04 2020 +0200
@@ -168,7 +168,7 @@
     |   }`if "position()!=last()" > ,`
 }
 
-emit "declarations:page-desc" {
+emit "definitions:page-desc" {
     |
     | var page_desc = {
     apply "$hmi_pages", mode="page_desc";
--- a/svghmi/widgets_common.ysl2	Wed Aug 05 18:53:56 2020 +0200
+++ b/svghmi/widgets_common.ysl2	Thu Aug 06 14:59:04 2020 +0200
@@ -156,7 +156,7 @@
     ||
 }
 
-emit "preamble:hmi-classes" {
+emit "declarations:hmi-classes" {
     const "used_widget_types", "func:unique_types($parsed_widgets/widget)";
     apply "$used_widget_types", mode="widget_class";
 }
@@ -171,7 +171,7 @@
 const "excluded_types", "str:split('Page Lang')";
 const "excluded_ids","$parsed_widgets/widget[not(@type = $excluded_types)]/@id";
 
-emit "preamble:hmi-elements" {
+emit "declarations:hmi-elements" {
     | var hmi_widgets = {
     apply  "$hmi_elements[@id = $excluded_ids]", mode="hmi_widgets";
     | }