summaryrefslogtreecommitdiff
path: root/js/Electrical/Resistor.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Electrical/Resistor.js')
-rw-r--r--js/Electrical/Resistor.js10
1 files changed, 5 insertions, 5 deletions
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;