diff options
author | Sunil Shetye | 2018-07-11 17:51:05 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-12 23:01:50 +0530 |
commit | 44a3807a94783e831070f0e003340af58dc64d16 (patch) | |
tree | cce50388afa463583d7a7aead34d40f5b02281f7 /js/Branching/MUX.js | |
parent | 0047c3bea1d86b12a08544f6f0833c63e77f6eac (diff) | |
download | sci2js-44a3807a94783e831070f0e003340af58dc64d16.tar.gz sci2js-44a3807a94783e831070f0e003340af58dc64d16.tar.bz2 sci2js-44a3807a94783e831070f0e003340af58dc64d16.zip |
change graphics to object
Diffstat (limited to 'js/Branching/MUX.js')
-rw-r--r-- | js/Branching/MUX.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js index 7d77713f..9bfc3ef9 100644 --- a/js/Branching/MUX.js +++ b/js/Branching/MUX.js @@ -25,8 +25,8 @@ function MUX() { MUX.prototype.set = function MUX() { this.in1 = parseFloat(arguments[0]["in1"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var 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); @@ -38,9 +38,9 @@ function MUX() { message("Block must have at least two input ports and at most 31"); var ok = false; } else { - var tmpvar0 = check_io(this.model,graphics,-transpose([1:this.in1]),0,[],[]) - this.model = tmpvar0[0] - var graphics = tmpvar0[1] + var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in1]),0,[],[]); + this.model = tmpvar0[0]; + this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; } } else { @@ -53,9 +53,9 @@ function MUX() { } else { var nout = sum(this.in1); } - var tmpvar1 = check_io(this.model,graphics,this.in1.slice(),nout,[],[]) - this.model = tmpvar1[0] - var graphics = tmpvar1[1] + var tmpvar1 = check_io(this.model,this.graphics,this.in1.slice(),nout,[],[]); + this.model = tmpvar1[0]; + this.graphics = tmpvar1[1]; var ok = tmpvar1[2]; if (ok) { this.in1 = size(this.in1,"*"); @@ -63,9 +63,9 @@ function MUX() { } } if (ok) { - graphics.exprs = exprs; + this.graphics.exprs = new ScilabDouble([exprs]); this.model.ipar = new ScilabDouble([this.in1]); - this.x.graphics = graphics; + this.x.graphics = this.graphics; this.x.model = this.model; break; } |