diff options
Diffstat (limited to 'js/Linear/SOM_f.js')
-rw-r--r-- | js/Linear/SOM_f.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/js/Linear/SOM_f.js b/js/Linear/SOM_f.js index 1a130333..06f1177f 100644 --- a/js/Linear/SOM_f.js +++ b/js/Linear/SOM_f.js @@ -9,9 +9,9 @@ function SOM_f() { this.model.rpar = new ScilabDouble(sgn); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = new ScilabDouble([true,false]); - var exprs = [[sci2exp(1)],[sci2exp(sgn)]]; - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SOM_f\",sz(1),sz(2));"]); - this.x = standard_define([2,2],this.model,exprs,gr_i); + this.exprs = [[sci2exp(1)],[sci2exp(sgn)]]; + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SOM_f\",sz(1),sz(2));"]); + this.x = standard_define([2,2],this.model,this.exprs,this.gr_i); return new BasicBlock(this.x); } SOM_f.prototype.details = function SOM_f() { @@ -26,12 +26,12 @@ function SOM_f() { this.x = arg1; this.graphics = arg1.graphics; this.model = arg1.model; - var exprs = this.graphics.exprs; - if (size(exprs,"*")==2) { - var exprs = exprs[2-1]; + this.exprs = this.graphics.exprs; + if (size(this.exprs,"*")==2) { + this.exprs = this.exprs[2-1]; } - if (size(exprs,"*")!=3) { - var exprs = string(this.model.rpar); + if (size(this.exprs,"*")!=3) { + this.exprs = string(this.model.rpar); } if (this.graphics.flip) { var labs = ["down","left","up"]; @@ -39,7 +39,7 @@ function SOM_f() { var labs = ["down","right","up"]; } var str = [["This sum block is obsolete","parameters cannot be modified. Please replace it with new sum block"],["and gain blocks in the linear palette"," ","Input ports are located at up, side and down positions.","Current gains are:"]]; - var str = [[str],[(part(labs.slice(),1,7)+exprs.slice())]]; + var str = [[str],[(part(labs.slice(),1,7)+this.exprs.slice())]]; message(str); return new BasicBlock(this.x); } |