summaryrefslogtreecommitdiff
path: root/js/Branching/MUX.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Branching/MUX.js')
-rw-r--r--js/Branching/MUX.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js
index 33cf91bb..710b3825 100644
--- a/js/Branching/MUX.js
+++ b/js/Branching/MUX.js
@@ -9,9 +9,9 @@ function MUX() {
this.model.ipar = new ScilabDouble([this.in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = string(this.in1);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX\",sz(1),sz(2));"]);
- this.x = standard_define([.5,2],this.model,exprs,gr_i);
+ this.exprs = string(this.in1);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX\",sz(1),sz(2));"]);
+ this.x = standard_define([.5,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
MUX.prototype.details = function MUX() {
@@ -24,12 +24,13 @@ function MUX() {
}
MUX.prototype.set = function MUX() {
this.in1 = parseFloat(arguments[0]["in1"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
- [ok,this.in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("intvec",-1),exprs);
+ [ok,this.in1,this.exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("intvec",-1),this.exprs);
if (!ok) {
break;
}
@@ -63,7 +64,7 @@ function MUX() {
}
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.ipar = new ScilabDouble([this.in1]);
this.x.graphics = this.graphics;
this.x.model = this.model;