--- a/svghmi/gen_index_xhtml.xslt Wed Nov 23 14:18:25 2022 +0100
+++ b/svghmi/gen_index_xhtml.xslt Thu Nov 24 16:12:03 2022 +0100
@@ -1217,6 +1217,8 @@
+ <xsl:text>const xmlns = "http://www.w3.org/2000/svg"; <xsl:text>let id = document.getElementById.bind(document);
<xsl:text>var svg_root = id("</xsl:text>
@@ -9145,21 +9147,23 @@
<xsl:text> // Compute visible Y range by merging fixed curves Y ranges
- <xsl:text> for(let minmax of this.minmaxes){
- <xsl:text> let [min,max] = minmax;
- <xsl:text> if(min < y_min)
- <xsl:text> y_min = min;
- <xsl:text> if(max > y_max)
- <xsl:text> y_max = max;
+ <xsl:text> for(let varopts of this.variables_options){ + <xsl:text> let minmax = varopts.minmax + <xsl:text> let [min,max] = minmax; + <xsl:text> if(min < y_min) + <xsl:text> y_min = min; + <xsl:text> if(max > y_max) + <xsl:text> y_max = max; @@ -9167,11 +9171,11 @@
<xsl:text> if(y_min !== Infinity && y_max !== -Infinity){
- <xsl:text> this.fixed_y_range = true;
+ <xsl:text> this.fixed_y_range = true; - <xsl:text> this.fixed_y_range = false;
+ <xsl:text> this.fixed_y_range = false; @@ -12755,8 +12759,6 @@
- <xsl:text>const xmlns = "http://www.w3.org/2000/svg";
<xsl:text>var edit_callback;
<xsl:text>const localtypes = {"PAGE_LOCAL":null, "HMI_LOCAL":null}
--- a/svghmi/inline_svg.ysl2 Wed Nov 23 14:18:25 2022 +0100
+++ b/svghmi/inline_svg.ysl2 Thu Nov 24 16:12:03 2022 +0100
@@ -209,6 +209,7 @@
const "result_svg_ns", "exsl:node-set($result_svg)";
emit "preamble:inline-svg" {
+ | const xmlns = "http://www.w3.org/2000/svg"; | let id = document.getElementById.bind(document);
| var svg_root = id("«$svg/@id»");
--- a/svghmi/svghmi.js Wed Nov 23 14:18:25 2022 +0100
+++ b/svghmi/svghmi.js Thu Nov 24 16:12:03 2022 +0100
@@ -666,7 +666,6 @@
-const xmlns = "http://www.w3.org/2000/svg";
const localtypes = {"PAGE_LOCAL":null, "HMI_LOCAL":null}
function edit_value(path, valuetype, callback, initial) {
--- a/svghmi/widget_xygraph.ysl2 Wed Nov 23 14:18:25 2022 +0100
+++ b/svghmi/widget_xygraph.ysl2 Thu Nov 24 16:12:03 2022 +0100
@@ -58,20 +58,21 @@
let y_min = Infinity, y_max = -Infinity;
// Compute visible Y range by merging fixed curves Y ranges
- for(let minmax of this.minmaxes){
- let [min,max] = minmax;
+ for(let varopts of this.variables_options){ + let minmax = varopts.minmax + let [min,max] = minmax; if(y_min !== Infinity && y_max !== -Infinity){
- this.fixed_y_range = true;
+ this.fixed_y_range = true; - this.fixed_y_range = false;
+ this.fixed_y_range = false; --- a/tests/projects/svghmi/svghmi_0@svghmi/svghmi.svg Wed Nov 23 14:18:25 2022 +0100
+++ b/tests/projects/svghmi/svghmi_0@svghmi/svghmi.svg Thu Nov 24 16:12:03 2022 +0100
@@ -136,11 +136,11 @@
inkscape:current-layer="hmi0"
- inkscape:zoom="0.40092403"
- inkscape:cx="2333.0807"
- inkscape:cy="1015.6842"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:zoom="2.2679688" + inkscape:cx="1135.0439" + inkscape:cy="130.37028" + inkscape:window-width="1850" + inkscape:window-height="1036" inkscape:window-maximized="1"
@@ -149,6 +149,33 @@
inkscape:snap-global="true"
inkscape:snap-bbox="true"
inkscape:bbox-nodes="true" />
+ style="color:#000000;fill:#000000" + inkscape:label="HMI:Page:ScreenSaver:20:u="nobody"@u=user_role" /> + transform="translate(-1072.3531,-845.86571)" + inkscape:label="HMI:VarInit:"admin"@user_role" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.66666603px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + sodipodi:role="line">declaration of user_level HMI local variable</tspan><tspan + sodipodi:role="line">(not a PLC variable)</tspan></text> @@ -6568,6 +6595,18 @@
sodipodi:role="line">Back</tspan></text>
+ inkscape:label="HMI:Display@user_role" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.03883362px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="text-align:end;text-anchor:end;stroke-width:1px">user</tspan></text> @@ -7867,7 +7906,7 @@
- transform="translate(73.327079,-819.60552)"
+ transform="translate(73.327079,-879.60552)" inkscape:label="HMI:Jump:Freq0"
@@ -8582,14 +8621,6 @@
sodipodi:role="line">Home</tspan></text>
- style="color:#000000;fill:#000000"
- inkscape:label="HMI:Page:ScreenSaver:12" />
transform="matrix(4.3157423,0,0,4.3157423,1737.4823,-785.25938)"
@@ -8872,4 +8903,54 @@
id="tspan1503-0" /></text>
+ inkscape:label="HMI:Display@user_role" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.03883362px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#ffff00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" + style="text-align:end;text-anchor:end;stroke-width:1px;fill:#ffff00;">user</tspan></text> + inkscape:label="HMI:Display@user_role" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.03883362px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#ffff00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="text296-3-7"><tspan + style="text-align:end;text-anchor:end;fill:#ffff00;stroke-width:1px">user</tspan></text> + inkscape:label="HMI:Assign:u="admin"@u=user_role" + transform="matrix(0.699363,0,0,0.699363,-1374.9838,537.10221)" + style="stroke-width:1.42987263"> + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffa32a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5.40424299;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.68354416px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.42987251px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="stroke-width:1.42987251px" + y="153.18002">login</tspan></text>