Commit dd505668 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Solveur updates

hide parameter Y
update Ytarget when nubToCalculate changes, if Ytarget was previously undefined
Showing with 5 additions and 1 deletion
+5 -1
......@@ -148,6 +148,10 @@ export class Solveur extends Nub implements Observer {
if (n.resultHasMultipleValues()) {
throw new Error("Solveur.update(): Nub to calculate must not have multiple values");
}
// update Ytarget
if (this.prms.Ytarget.singleValue === undefined) {
this.prms.Ytarget.singleValue = this.nubToCalculate.calculatedParam.singleValue;
}
}
}
if (data.name === "searchedParameter") {
......
......@@ -36,7 +36,7 @@ export class SolveurParams extends ParamsEquation implements IObservable {
this._observable = new Observable();
this._Xinit = new ParamDefinition(this, "Xinit", ParamDomainValue.ANY, undefined, rXinit);
this._Ytarget = new ParamDefinition(this, "Ytarget", ParamDomainValue.ANY, undefined, rYtarget);
this._Y = new ParamDefinition(this, "Y", ParamDomainValue.ANY);
this._Y = new ParamDefinition(this, "Y", ParamDomainValue.ANY, undefined, undefined, undefined, false);
this.addParamDefinition(this._Xinit);
this.addParamDefinition(this._Ytarget);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment