From 3386d0d537a498adce65f313aacb7ca4a147a4d2 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Fri, 24 Aug 2018 11:46:02 +0530 Subject: remove exprs and gr_i from default global list --- js/Electrical/Resistor.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/Electrical/Resistor.js') diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js index fc7188de..5a7e80c9 100644 --- a/js/Electrical/Resistor.js +++ b/js/Electrical/Resistor.js @@ -15,9 +15,9 @@ function Resistor() { this.model.equations = new ScilabDouble([mo]); this.model.in = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); - this.exprs = string(this.R); - this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Resistor\",sz(1),sz(2));"]); - this.x = new standard_define(new ScilabDouble([2,1]),this.model,new ScilabString([this.exprs]),list(this.gr_i,0)); + var exprs = string(this.R); + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Resistor\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2,1]),this.model,new ScilabString([exprs]),list(gr_i,0)); this.x.graphics.in_implicit = ["I"]; this.x.graphics.out_implicit = ["I"]; return new BasicBlock(this.x); @@ -32,7 +32,7 @@ function Resistor() { return options; } Resistor.prototype.set = function Resistor() { - this.exprs = this.graphics.exprs; + var exprs = this.graphics.exprs; while (true) { var ok = true; this.R = parseFloat(arguments[0]["R"]); @@ -41,7 +41,7 @@ function Resistor() { } this.model.rpar = new ScilabDouble([this.R]); this.model.equations.parameters[2-1] = list(new ScilabDouble([this.R])); - this.graphics.exprs = new ScilabDouble([this.exprs]); + this.graphics.exprs = new ScilabDouble([exprs]); this.x.graphics = this.graphics; this.x.model = this.model; break; -- cgit