mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
fix expression evaluation
This commit is contained in:
parent
e7c6a79f49
commit
8061fdc54d
1 changed files with 3 additions and 4 deletions
|
|
@ -31,10 +31,7 @@ export function activate(ctx: ApplicationContext) {
|
||||||
}
|
}
|
||||||
let value = table$.value[expr];
|
let value = table$.value[expr];
|
||||||
if (value === undefined) {
|
if (value === undefined) {
|
||||||
value = parseFloat(expr);
|
value = _evaluateExpression(expr);
|
||||||
if (isNaN(value)) {
|
|
||||||
value = _evaluateExpression(expr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
@ -58,6 +55,8 @@ export function activate(ctx: ApplicationContext) {
|
||||||
};
|
};
|
||||||
|
|
||||||
table$.attach(() => ctx.expressionService.signature = Date.now() + '');
|
table$.attach(() => ctx.expressionService.signature = Date.now() + '');
|
||||||
|
|
||||||
|
load('');
|
||||||
}
|
}
|
||||||
|
|
||||||
function rebuildVariableTable(script) {
|
function rebuildVariableTable(script) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue