summaryrefslogtreecommitdiff
path: root/js/Branching/RELAY_f.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Branching/RELAY_f.js')
-rw-r--r--js/Branching/RELAY_f.js39
1 files changed, 20 insertions, 19 deletions
diff --git a/js/Branching/RELAY_f.js b/js/Branching/RELAY_f.js
index ca190330..71b2d9e7 100644
--- a/js/Branching/RELAY_f.js
+++ b/js/Branching/RELAY_f.js
@@ -15,35 +15,36 @@ function RELAY_f() {
model.dep_ut = [true,true];
exprs = [[string(nin)],[string(i0+1)]];
gr_i = [];
- x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],model,exprs,gr_i);
}
RELAY_f.prototype.details = function RELAY_f() {
+ return this.x;
}
RELAY_f.prototype.get = function RELAY_f() {
}
RELAY_f.prototype.set = function RELAY_f() {
- x = arg1;
+ this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
ipar = model.ipar;
while (true) {
- [ok,nin,z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
- if (!ok) {
-break;
-}
- if (z0>nin||z0<=0) {
-message("initial connected input is not a valid input port number");
- } else {
- [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,ones(nin,1),[]);
- if (ok) {
- graphics.exprs = exprs;
- model.dstate = z0-1;
- x.graphics = graphics;
- x.model = model;
-break;
-}
-}
-}
+ [ok,nin,z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
+ if (!ok) {
+ break;
+ }
+ if (z0>nin||z0<=0) {
+ message("initial connected input is not a valid input port number");
+ } else {
+ [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,ones(nin,1),[]);
+ if (ok) {
+ graphics.exprs = exprs;
+ model.dstate = z0-1;
+ this.x.graphics = graphics;
+ this.x.model = model;
+ break;
+ }
+ }
+ }
}
}