--- a/svghmi/gen_index_xhtml.xslt Fri Dec 16 13:46:07 2022 +0100
+++ b/svghmi/gen_index_xhtml.xslt Fri Dec 16 13:46:51 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>
@@ -2158,7 +2160,7 @@
<xsl:text> undeafen(index){
@@ -2168,6 +2170,10 @@
<xsl:text> this.incoming[index] = undefined;
+ <xsl:text> // TODO: add timestamp argument to dispatch, so that defered data do not appear wrong on graphs + <xsl:text> this.lastdispatch[index] = Date.now(); <xsl:text> this.do_dispatch(new_val, old_val, index);
@@ -5586,7 +5592,7 @@
<xsl:if test="$have_value">
<xsl:text> animate: function(){
- <xsl:text> this.value_elt.textContent = String(this.display);
+ <xsl:text> multiline_to_svg_text(this.value_elt, String(this.display)); @@ -5624,7 +5630,7 @@
<xsl:if test="$have_value">
- <xsl:text> this.value_elt.textContent = "";
+ <xsl:text> multiline_to_svg_text(this.value_elt, ""); @@ -9145,21 +9151,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 +9175,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; @@ -9265,6 +9273,8 @@
+ <xsl:text> console.log("dispatch(",value,oldval, index, time); <xsl:text> // naive local buffer impl.
<xsl:text> // data is updated only when graph is visible
@@ -12755,8 +12765,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}