# HG changeset patch
# User Edouard Tisserant
# Date 1669287943 -3600
# Node ID 9289fdda0222d30e334c4e7eb79b6b8ae8e0d214
# Parent  f41733be17a8973b8cf8dffecf1d41761355fd37
SVGHMI: fix XY graph init (consequence of earlier change) + reindent

Earlier change did modify the variables attributes (options) are stored in widget objects. XY graph uses variables' min and max to determine range.

diff -r f41733be17a8 -r 9289fdda0222 svghmi/widget_xygraph.ysl2
--- a/svghmi/widget_xygraph.ysl2	Thu Nov 24 11:47:56 2022 +0100
+++ b/svghmi/widget_xygraph.ysl2	Thu Nov 24 12:05:43 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;