diff -r 2299f25779ce -r 7fbcc7b741b7 svghmi/gen_index_xhtml.xslt --- 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 @@ + const xmlns = "http://www.w3.org/2000/svg"; + let id = document.getElementById.bind(document); var svg_root = id(" @@ -2158,7 +2160,7 @@ } - + undeafen(index){ @@ -2168,6 +2170,10 @@ this.incoming[index] = undefined; + // TODO: add timestamp argument to dispatch, so that defered data do not appear wrong on graphs + + this.lastdispatch[index] = Date.now(); + this.do_dispatch(new_val, old_val, index); } @@ -5586,7 +5592,7 @@ animate: function(){ - this.value_elt.textContent = String(this.display); + multiline_to_svg_text(this.value_elt, String(this.display)); }, @@ -5624,7 +5630,7 @@ - this.value_elt.textContent = ""; + multiline_to_svg_text(this.value_elt, ""); }, @@ -9145,21 +9151,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 +9175,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; } @@ -9265,6 +9273,8 @@ + console.log("dispatch(",value,oldval, index, time); + // naive local buffer impl. // data is updated only when graph is visible @@ -12755,8 +12765,6 @@ - const xmlns = "http://www.w3.org/2000/svg"; - var edit_callback; const localtypes = {"PAGE_LOCAL":null, "HMI_LOCAL":null}