diff options
Diffstat (limited to 'js/Sources/STEP.js')
-rw-r--r-- | js/Sources/STEP.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js index 972a8fe3..c5d93cd3 100644 --- a/js/Sources/STEP.js +++ b/js/Sources/STEP.js @@ -13,9 +13,9 @@ function STEP() { this.model.rpar = new ScilabDouble(rpar); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = new ScilabDouble([false,false]); - var exprs = [[string(1)],[string(rpar)]]; - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"STEP\",sz(1),sz(2));"]); - this.x = standard_define([2,2],this.model,exprs,gr_i); + this.exprs = [[string(1)],[string(rpar)]]; + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"STEP\",sz(1),sz(2));"]); + this.x = standard_define([2,2],this.model,this.exprs,this.gr_i); return new BasicBlock(this.x); } STEP.prototype.details = function STEP() { @@ -33,12 +33,13 @@ function STEP() { this.temps = arguments[0]["temps"] this.in1 = arguments[0]["in1"] this.fi = arguments[0]["fi"] + 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.temps,this.in1,this.fi,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","STEP_FUNCTION")],[" "],["Step Function"],[" "]],["Step Time","Initial Value","Final Value"],list("vec",1,"vec",-1,"vec",-1),exprs); + [ok,this.temps,this.in1,this.fi,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","STEP_FUNCTION")],[" "],["Step Function"],[" "]],["Step Time","Initial Value","Final Value"],list("vec",1,"vec",-1,"vec",-1),this.exprs); if (!ok) { break; } @@ -70,7 +71,7 @@ function STEP() { var rpar = [[this.in1],[this.fi]]; } this.model.rpar = new ScilabDouble(rpar); - this.graphics.exprs = new ScilabDouble([exprs]); + this.graphics.exprs = new ScilabDouble([this.exprs]); this.x.graphics = this.graphics; this.x.model = this.model; break; |