Enable auto cfg loading and running from arguments.

This commit is contained in:
2026-06-13 16:37:16 +02:00
parent 5f2f76a7d3
commit dd7100d1d5
4 changed files with 74 additions and 20 deletions
+5 -4
View File
@@ -102,12 +102,13 @@ function resizePl(flag){
width: newx,
height: newy
};
const canRelayout = (plotDiv) => plotDiv && plotDiv.data && plotDiv.layout;
if (flag == null) {
Plotly.relayout(plotDiv1,update);
Plotly.relayout(plotDiv2,update);
if (canRelayout(plotDiv1)) Plotly.relayout(plotDiv1,update);
if (canRelayout(plotDiv2)) Plotly.relayout(plotDiv2,update);
} else if (flag == 1) {
Plotly.relayout(plotDiv1,update);
if (canRelayout(plotDiv1)) Plotly.relayout(plotDiv1,update);
} else if ( flag == 2) {
Plotly.relayout(plotDiv2,update);
if (canRelayout(plotDiv2)) Plotly.relayout(plotDiv2,update);
}
}