svghmi/widget_xygraph.ysl2
branchwxPython4
changeset 3692 a9b787d84846
parent 3691 9289fdda0222
equal deleted inserted replaced
3688:c2992796a859 3692:a9b787d84846
    56             this.clip = false;
    56             this.clip = false;
    57 
    57 
    58             let y_min = Infinity, y_max = -Infinity;
    58             let y_min = Infinity, y_max = -Infinity;
    59 
    59 
    60             // Compute visible Y range by merging fixed curves Y ranges
    60             // Compute visible Y range by merging fixed curves Y ranges
    61             for(let minmax of this.minmaxes){
    61             for(let varopts of this.variables_options){
    62                if(minmax){
    62                 let minmax = varopts.minmax 
    63                    let [min,max] = minmax;
    63                 if(minmax){
    64                    if(min < y_min)
    64                     let [min,max] = minmax;
    65                        y_min = min;
    65                     if(min < y_min)
    66                    if(max > y_max)
    66                         y_min = min;
    67                        y_max = max;
    67                     if(max > y_max)
    68                }
    68                         y_max = max;
       
    69                 }
    69             }
    70             }
    70 
    71 
    71             if(y_min !== Infinity && y_max !== -Infinity){
    72             if(y_min !== Infinity && y_max !== -Infinity){
    72                this.fixed_y_range = true;
    73                 this.fixed_y_range = true;
    73             } else {
    74             } else {
    74                this.fixed_y_range = false;
    75                 this.fixed_y_range = false;
    75             }
    76             }
    76 
    77 
    77             this.ymin = y_min;
    78             this.ymin = y_min;
    78             this.ymax = y_max;
    79             this.ymax = y_max;
    79 
    80