# HG changeset patch # User Edouard Tisserant # Date 1669302723 -3600 # Node ID a9b787d848465b3e28c69fd3ae411f6f80fa087f # Parent c2992796a8597b89dff29c5e36bfa5cd9f22841a# Parent 9289fdda0222d30e334c4e7eb79b6b8ae8e0d214 Merged changes from default in wxPython4 branch diff -r c2992796a859 -r a9b787d84846 svghmi/gen_index_xhtml.xslt --- 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 @@ + const xmlns = "http://www.w3.org/2000/svg"; + let id = document.getElementById.bind(document); var svg_root = id(" @@ -9145,21 +9147,23 @@ // Compute visible Y range by merging fixed curves Y ranges - for(let minmax of this.minmaxes){ - - if(minmax){ - - let [min,max] = minmax; - - if(min < y_min) - - y_min = min; - - if(max > y_max) - - y_max = max; - - } + for(let varopts of this.variables_options){ + + let minmax = varopts.minmax + + if(minmax){ + + let [min,max] = minmax; + + if(min < y_min) + + y_min = min; + + if(max > y_max) + + y_max = max; + + } } @@ -9167,11 +9171,11 @@ if(y_min !== Infinity && y_max !== -Infinity){ - this.fixed_y_range = true; + this.fixed_y_range = true; } else { - this.fixed_y_range = false; + this.fixed_y_range = false; } @@ -12755,8 +12759,6 @@ - const xmlns = "http://www.w3.org/2000/svg"; - var edit_callback; const localtypes = {"PAGE_LOCAL":null, "HMI_LOCAL":null} diff -r c2992796a859 -r a9b787d84846 svghmi/inline_svg.ysl2 --- 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»"); } diff -r c2992796a859 -r a9b787d84846 svghmi/svghmi.js --- 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 @@ create_ws() -const xmlns = "http://www.w3.org/2000/svg"; var edit_callback; const localtypes = {"PAGE_LOCAL":null, "HMI_LOCAL":null} function edit_value(path, valuetype, callback, initial) { diff -r c2992796a859 -r a9b787d84846 svghmi/widget_xygraph.ysl2 --- 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){ - if(minmax){ - let [min,max] = minmax; - if(min < y_min) - y_min = min; - if(max > y_max) - y_max = max; - } + for(let varopts of this.variables_options){ + let minmax = varopts.minmax + if(minmax){ + let [min,max] = minmax; + if(min < y_min) + y_min = min; + if(max > y_max) + y_max = max; + } } if(y_min !== Infinity && y_max !== -Infinity){ - this.fixed_y_range = true; + this.fixed_y_range = true; } else { - this.fixed_y_range = false; + this.fixed_y_range = false; } this.ymin = y_min; diff -r c2992796a859 -r a9b787d84846 tests/projects/svghmi/svghmi_0@svghmi/svghmi.svg --- 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" showgrid="false" units="px" - 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-x="0" inkscape:window-y="27" inkscape:window-maximized="1" @@ -149,6 +149,33 @@ inkscape:snap-global="true" inkscape:snap-bbox="true" inkscape:bbox-nodes="true" /> + + + declaration of user_level HMI local variable(not a PLC variable) + Back + user Home - + user + user + + + login +