linny-r 1.6.5 → 1.6.6
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
CHANGED
@@ -305,14 +305,15 @@ class ActorManager {
|
|
305
305
|
// Set its round flags
|
306
306
|
a.round_flags = ali[2];
|
307
307
|
// Double-check: parse expression if weight has been changed.
|
308
|
-
|
309
|
-
|
308
|
+
const awx = monoSpacedVariables(ali[3]);
|
309
|
+
if(a.weight.text != awx) {
|
310
|
+
xp.expr = awx;
|
310
311
|
xp.compile();
|
311
312
|
if(xp.error) {
|
312
313
|
UI.warningInvalidWeightExpression(a, xp.error);
|
313
314
|
ok = false;
|
314
315
|
} else {
|
315
|
-
a.weight.update(
|
316
|
+
a.weight.update(xp);
|
316
317
|
}
|
317
318
|
}
|
318
319
|
// Update import/export status
|
@@ -332,6 +332,9 @@ class GUIExperimentManager extends ExperimentManager {
|
|
332
332
|
document.getElementById('xp-reset-btn').classList.add('off');
|
333
333
|
}
|
334
334
|
this.updateParameters();
|
335
|
+
// NOTE: When UpdateDialog is called after an entity has been renamed,
|
336
|
+
// its variable list should be updated.
|
337
|
+
this.updateViewerVariable();
|
335
338
|
}
|
336
339
|
|
337
340
|
updateParameters() {
|
@@ -515,6 +518,10 @@ class GUIExperimentManager extends ExperimentManager {
|
|
515
518
|
addDistinct(vn, vl);
|
516
519
|
}
|
517
520
|
vl.sort((a, b) => UI.compareFullNames(a, b));
|
521
|
+
// NOTE: When the selected variable entity has been renamed, its
|
522
|
+
// name will not be in the list (and its old name cannot be inferred)
|
523
|
+
// so then clear it.
|
524
|
+
if(vl.indexOf(x.selected_variable) < 0) x.selected_variable = '';
|
518
525
|
for(let i = 0; i < vl.length; i++) {
|
519
526
|
const vn = vl[i];
|
520
527
|
// NOTE: FireFox selector dropdown areas have a pale gray
|
@@ -4295,7 +4295,7 @@ class VirtualMachine {
|
|
4295
4295
|
cv = this.chunk_variables[ci - this.chunk_offset];
|
4296
4296
|
}
|
4297
4297
|
// NOTE: Do not scale the coefficient of the cash variable.
|
4298
|
-
if(!cv[0].startsWith('C')) cc[ci] *= m;
|
4298
|
+
if(cv && !cv[0].startsWith('C')) cc[ci] *= m;
|
4299
4299
|
}
|
4300
4300
|
}
|
4301
4301
|
}
|