svghmi/gen_index_xhtml.xslt
branchwxPython4
changeset 3692 a9b787d84846
parent 3688 c2992796a859
child 3711 f68449d64d1c
equal deleted inserted replaced
3688:c2992796a859 3692:a9b787d84846
  1215     <xsl:value-of select="local-name()"/>
  1215     <xsl:value-of select="local-name()"/>
  1216     <xsl:text> */
  1216     <xsl:text> */
  1217 </xsl:text>
  1217 </xsl:text>
  1218     <xsl:text>
  1218     <xsl:text>
  1219 </xsl:text>
  1219 </xsl:text>
       
  1220     <xsl:text>const xmlns = "http://www.w3.org/2000/svg";
       
  1221 </xsl:text>
  1220     <xsl:text>let id = document.getElementById.bind(document);
  1222     <xsl:text>let id = document.getElementById.bind(document);
  1221 </xsl:text>
  1223 </xsl:text>
  1222     <xsl:text>var svg_root = id("</xsl:text>
  1224     <xsl:text>var svg_root = id("</xsl:text>
  1223     <xsl:value-of select="$svg/@id"/>
  1225     <xsl:value-of select="$svg/@id"/>
  1224     <xsl:text>");
  1226     <xsl:text>");
  9143 </xsl:text>
  9145 </xsl:text>
  9144     <xsl:text>
  9146     <xsl:text>
  9145 </xsl:text>
  9147 </xsl:text>
  9146     <xsl:text>        // Compute visible Y range by merging fixed curves Y ranges
  9148     <xsl:text>        // Compute visible Y range by merging fixed curves Y ranges
  9147 </xsl:text>
  9149 </xsl:text>
  9148     <xsl:text>        for(let minmax of this.minmaxes){
  9150     <xsl:text>        for(let varopts of this.variables_options){
  9149 </xsl:text>
  9151 </xsl:text>
  9150     <xsl:text>           if(minmax){
  9152     <xsl:text>            let minmax = varopts.minmax 
  9151 </xsl:text>
  9153 </xsl:text>
  9152     <xsl:text>               let [min,max] = minmax;
  9154     <xsl:text>            if(minmax){
  9153 </xsl:text>
  9155 </xsl:text>
  9154     <xsl:text>               if(min &lt; y_min)
  9156     <xsl:text>                let [min,max] = minmax;
  9155 </xsl:text>
  9157 </xsl:text>
  9156     <xsl:text>                   y_min = min;
  9158     <xsl:text>                if(min &lt; y_min)
  9157 </xsl:text>
  9159 </xsl:text>
  9158     <xsl:text>               if(max &gt; y_max)
  9160     <xsl:text>                    y_min = min;
  9159 </xsl:text>
  9161 </xsl:text>
  9160     <xsl:text>                   y_max = max;
  9162     <xsl:text>                if(max &gt; y_max)
  9161 </xsl:text>
  9163 </xsl:text>
  9162     <xsl:text>           }
  9164     <xsl:text>                    y_max = max;
       
  9165 </xsl:text>
       
  9166     <xsl:text>            }
  9163 </xsl:text>
  9167 </xsl:text>
  9164     <xsl:text>        }
  9168     <xsl:text>        }
  9165 </xsl:text>
  9169 </xsl:text>
  9166     <xsl:text>
  9170     <xsl:text>
  9167 </xsl:text>
  9171 </xsl:text>
  9168     <xsl:text>        if(y_min !== Infinity &amp;&amp; y_max !== -Infinity){
  9172     <xsl:text>        if(y_min !== Infinity &amp;&amp; y_max !== -Infinity){
  9169 </xsl:text>
  9173 </xsl:text>
  9170     <xsl:text>           this.fixed_y_range = true;
  9174     <xsl:text>            this.fixed_y_range = true;
  9171 </xsl:text>
  9175 </xsl:text>
  9172     <xsl:text>        } else {
  9176     <xsl:text>        } else {
  9173 </xsl:text>
  9177 </xsl:text>
  9174     <xsl:text>           this.fixed_y_range = false;
  9178     <xsl:text>            this.fixed_y_range = false;
  9175 </xsl:text>
  9179 </xsl:text>
  9176     <xsl:text>        }
  9180     <xsl:text>        }
  9177 </xsl:text>
  9181 </xsl:text>
  9178     <xsl:text>
  9182     <xsl:text>
  9179 </xsl:text>
  9183 </xsl:text>
 12753 </xsl:text>
 12757 </xsl:text>
 12754           <xsl:text>create_ws()
 12758           <xsl:text>create_ws()
 12755 </xsl:text>
 12759 </xsl:text>
 12756           <xsl:text>
 12760           <xsl:text>
 12757 </xsl:text>
 12761 </xsl:text>
 12758           <xsl:text>const xmlns = "http://www.w3.org/2000/svg";
       
 12759 </xsl:text>
       
 12760           <xsl:text>var edit_callback;
 12762           <xsl:text>var edit_callback;
 12761 </xsl:text>
 12763 </xsl:text>
 12762           <xsl:text>const localtypes = {"PAGE_LOCAL":null, "HMI_LOCAL":null}
 12764           <xsl:text>const localtypes = {"PAGE_LOCAL":null, "HMI_LOCAL":null}
 12763 </xsl:text>
 12765 </xsl:text>
 12764           <xsl:text>function edit_value(path, valuetype, callback, initial) {
 12766           <xsl:text>function edit_value(path, valuetype, callback, initial) {