linny-r 2.0.9 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -2
- package/static/images/solve-not-same-changed.png +0 -0
- package/static/images/solve-not-same-not-changed.png +0 -0
- package/static/images/solve-same-changed.png +0 -0
- package/static/images/solve-same-not-changed.png +0 -0
- package/static/index.html +81 -11
- package/static/linny-r.css +250 -7
- package/static/scripts/linny-r-ctrl.js +76 -13
- package/static/scripts/linny-r-gui-chart-manager.js +13 -12
- package/static/scripts/linny-r-gui-constraint-editor.js +4 -4
- package/static/scripts/linny-r-gui-controller.js +416 -43
- package/static/scripts/linny-r-gui-dataset-manager.js +122 -93
- package/static/scripts/linny-r-gui-experiment-manager.js +22 -12
- package/static/scripts/linny-r-gui-expression-editor.js +26 -12
- package/static/scripts/linny-r-gui-finder.js +190 -5
- package/static/scripts/linny-r-gui-repository-browser.js +18 -0
- package/static/scripts/linny-r-model.js +192 -84
- package/static/scripts/linny-r-utils.js +13 -2
- package/static/scripts/linny-r-vm.js +137 -95
@@ -331,7 +331,7 @@ class GUIChartManager extends ChartManager {
|
|
331
331
|
}
|
332
332
|
|
333
333
|
updateSelector() {
|
334
|
-
//
|
334
|
+
// Add one option to the selector for each chart defined for the model.
|
335
335
|
// NOTE: Add the "new chart" option if it is not in the list.
|
336
336
|
MODEL.addChart(this.new_chart_title);
|
337
337
|
if(this.chart_index < 0) this.chart_index = 0;
|
@@ -545,16 +545,16 @@ class GUIChartManager extends ChartManager {
|
|
545
545
|
}
|
546
546
|
|
547
547
|
selectChart() {
|
548
|
-
//
|
548
|
+
// Set the selected chart to be the "active" chart.
|
549
549
|
const ci = parseInt(this.chart_selector.value);
|
550
|
-
// Deselect variable only if different chart is selected
|
550
|
+
// Deselect variable only if different chart is selected.
|
551
551
|
if(ci !== this.chart_index) this.variable_index = -1;
|
552
552
|
this.chart_index = ci;
|
553
553
|
this.updateDialog();
|
554
554
|
}
|
555
555
|
|
556
556
|
promptForTitle() {
|
557
|
-
//
|
557
|
+
// Prompt modeler for a new title for the current chart.
|
558
558
|
if(this.chart_index >= 0) {
|
559
559
|
this.rename_chart_modal.show();
|
560
560
|
const nct = document.getElementById('new-chart-title');
|
@@ -564,29 +564,29 @@ class GUIChartManager extends ChartManager {
|
|
564
564
|
}
|
565
565
|
|
566
566
|
renameChart() {
|
567
|
-
//
|
567
|
+
// Rename the current chart.
|
568
568
|
if(this.chart_index >= 0) {
|
569
|
-
const t = document.getElementById('new-chart-title').value
|
570
|
-
// Check if a chart with this title already exists
|
569
|
+
const t = UI.cleanName(document.getElementById('new-chart-title').value);
|
570
|
+
// Check if a chart with this title already exists.
|
571
571
|
const ci = MODEL.indexOfChart(t);
|
572
572
|
if(ci >= 0 && ci != this.chart_index) {
|
573
573
|
UI.warn(`A chart with title "${t}" already exists`);
|
574
574
|
} else {
|
575
575
|
const c = MODEL.charts[this.chart_index];
|
576
|
-
// Remember the old title of the chart-to-be-renamed
|
576
|
+
// Remember the old title of the chart-to-be-renamed.
|
577
577
|
const ot = c.title;
|
578
578
|
c.title = t;
|
579
|
-
// If the default '(new chart)' has been renamed, create a new one
|
579
|
+
// If the default '(new chart)' has been renamed, create a new one.
|
580
580
|
if(ot === this.new_chart_title) {
|
581
581
|
MODEL.addChart(ot);
|
582
582
|
}
|
583
|
-
// Update the chart index so that it points to the renamed chart
|
583
|
+
// Update the chart index so that it points to the renamed chart.
|
584
584
|
this.chart_index = MODEL.indexOfChart(t);
|
585
585
|
this.updateSelector();
|
586
|
-
// Redraw the chart if title is shown
|
586
|
+
// Redraw the chart if title is shown.
|
587
587
|
if(c.show_title) this.drawChart();
|
588
588
|
}
|
589
|
-
// Update
|
589
|
+
// Update dialogs that may refer to this chart.
|
590
590
|
UI.updateControllerDialogs('CFX');
|
591
591
|
}
|
592
592
|
this.rename_chart_modal.hide();
|
@@ -744,6 +744,7 @@ class GUIChartManager extends ChartManager {
|
|
744
744
|
chart.addWildcardVariables(dsm, indices);
|
745
745
|
} else if(dsm.selector.startsWith(':')) {
|
746
746
|
UI.notify('Plotting methods is work-in-progress!');
|
747
|
+
console.log('HERE dsm', dsm, 'expr', dsm.expression.text, 'indices', indices);
|
747
748
|
} else {
|
748
749
|
UI.notify(`Variable "${dsm.displayName}" cannot be plotted`);
|
749
750
|
}
|
@@ -1114,13 +1114,13 @@ class ConstraintEditor {
|
|
1114
1114
|
}
|
1115
1115
|
|
1116
1116
|
showDialog(group=[]) {
|
1117
|
-
this.from_node = MODEL.objectByName(this.from_name.
|
1118
|
-
this.to_node = MODEL.objectByName(this.to_name.
|
1119
|
-
// Double-check that these nodes exist
|
1117
|
+
this.from_node = MODEL.objectByName(this.from_name.innerText);
|
1118
|
+
this.to_node = MODEL.objectByName(this.to_name.innerText);
|
1119
|
+
// Double-check that these nodes exist.
|
1120
1120
|
if(!(this.from_node && this.to_node)) {
|
1121
1121
|
throw 'ERROR: Unknown constraint node(s)';
|
1122
1122
|
}
|
1123
|
-
// See if existing constraint is edited
|
1123
|
+
// See if existing constraint is edited.
|
1124
1124
|
this.edited_constraint = this.from_node.doesConstrain(this.to_node);
|
1125
1125
|
if(this.edited_constraint) {
|
1126
1126
|
// Make a working copy, as the constraint must be changed only when
|