summaryrefslogtreecommitdiff
path: root/js/Electrical/Inductor.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Electrical/Inductor.js')
-rw-r--r--js/Electrical/Inductor.js31
1 files changed, 16 insertions, 15 deletions
diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js
index 679331e9..915a8d35 100644
--- a/js/Electrical/Inductor.js
+++ b/js/Electrical/Inductor.js
@@ -17,30 +17,31 @@ function Inductor() {
model.equations = mo;
exprs = string(L);
gr_i = [];
- x = standard_define([2,0.9],model,exprs,list(gr_i,0));
- x.graphics.in_implicit = ["I"];
- x.graphics.out_implicit = ["I"];
+ this.x = standard_define([2,0.9],model,exprs,list(gr_i,0));
+ this.x.graphics.in_implicit = ["I"];
+ this.x.graphics.out_implicit = ["I"];
}
Inductor.prototype.details = function Inductor() {
+ return this.x;
}
Inductor.prototype.get = function Inductor() {
}
Inductor.prototype.set = function Inductor() {
- x = arg1;
+ this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,L,exprs] = scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs);
- if (!ok) {
-break;
-}
- model.rpar = L;
- model.equations.parameters[2-1] = list(L);
- graphics.exprs = exprs;
- x.graphics = graphics;
- x.model = model;
-break;
-}
+ [ok,L,exprs] = scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs);
+ if (!ok) {
+ break;
+ }
+ model.rpar = L;
+ model.equations.parameters[2-1] = list(L);
+ graphics.exprs = exprs;
+ this.x.graphics = graphics;
+ this.x.model = model;
+ break;
+ }
}
}