diff options
Diffstat (limited to 'js/Sources/FROMWS_c.js')
-rw-r--r-- | js/Sources/FROMWS_c.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js index 0626ae40..02a6c352 100644 --- a/js/Sources/FROMWS_c.js +++ b/js/Sources/FROMWS_c.js @@ -16,9 +16,9 @@ function FROMWS_c() { this.model.firing = new ScilabDouble([0]); this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = new ScilabDouble([false,true]); - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"FROMWS_c\",sz(1),sz(2));"]); - var exprs = [[string(this.varnam)],[string(this.Method)],[string(this.ZC)],[string(this.OutEnd)]]; - this.x = standard_define([3.5,2],this.model,exprs,gr_i); + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"FROMWS_c\",sz(1),sz(2));"]); + this.exprs = [[string(this.varnam)],[string(this.Method)],[string(this.ZC)],[string(this.OutEnd)]]; + this.x = standard_define([3.5,2],this.model,this.exprs,this.gr_i); return new BasicBlock(this.x); } FROMWS_c.prototype.details = function FROMWS_c() { @@ -38,12 +38,13 @@ function FROMWS_c() { this.Method = parseFloat(arguments[0]["Method"]) this.ZC = parseFloat(arguments[0]["ZC"]) this.OutEnd = parseFloat(arguments[0]["OutEnd"]) + 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.varnam,this.Method,this.ZC,this.OutEnd,exprs] = scicos_getvalue("Set From_Workspace block parameters",["Variable name","Interpolation Method","Enable zero crossing(0:No, 1:Yes)?","Output at end(0:Zero, 1:Hold, 2:Repeat)"],list("str",1,"vec",1,"vec",1,"vec",1),exprs); + [ok,this.varnam,this.Method,this.ZC,this.OutEnd,this.exprs] = scicos_getvalue("Set From_Workspace block parameters",["Variable name","Interpolation Method","Enable zero crossing(0:No, 1:Yes)?","Output at end(0:Zero, 1:Hold, 2:Repeat)"],list("str",1,"vec",1,"vec",1,"vec",1),this.exprs); if (!ok) { break; } @@ -72,7 +73,7 @@ function FROMWS_c() { this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; if (ok) { - this.graphics.exprs = new ScilabDouble([exprs]); + this.graphics.exprs = new ScilabDouble([this.exprs]); this.x.graphics = this.graphics; this.x.model = this.model; break; |