diff options
author | Sunil Shetye | 2018-07-09 11:43:39 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-09 12:16:25 +0530 |
commit | 62b1d7dd9183ed75733b44104890586b03818214 (patch) | |
tree | 9859e9ca295df98df945bd5fcccc3a264e8bede1 /js/Sources/TKSCALE.js | |
parent | 5c011853630a1b466ef4789d5b600dd530d0a3ec (diff) | |
download | sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2 sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip |
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Sources/TKSCALE.js')
-rw-r--r-- | js/Sources/TKSCALE.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/js/Sources/TKSCALE.js b/js/Sources/TKSCALE.js index c29ec00e..4f31582a 100644 --- a/js/Sources/TKSCALE.js +++ b/js/Sources/TKSCALE.js @@ -4,16 +4,16 @@ function TKSCALE() { this.a = -10; this.b = 10; this.f = 1; - model = scicos_model(); - model.sim = list("tkscaleblk",5); - model.out = 1; - model.evtin = 1; - model.rpar = [[this.a],[this.b],[this.f]]; - model.blocktype = "d"; - model.dep_ut = [false,false]; + this.model = scicos_model(); + this.model.sim = list("tkscaleblk",5); + this.model.out = new ScilabDouble(1); + this.model.evtin = new ScilabDouble(1); + this.model.rpar = [[this.a],[this.b],[this.f]]; + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [false,false]; exprs = [[sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.f)]]; gr_i = []; - this.x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } TKSCALE.prototype.details = function TKSCALE() { @@ -34,13 +34,13 @@ function TKSCALE() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; [ok,this.a,this.b,this.f,exprs] = scicos_getvalue("Set scale block parameters",["Min value","Max value","Normalization"],list("vec",1,"vec",1,"vec",1),exprs); if (ok) { graphics.exprs = exprs; - model.rpar = [[this.a],[this.b],[this.f]]; + this.model.rpar = [[this.a],[this.b],[this.f]]; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; } return new BasicBlock(this.x); } |