diff options
author | Sunil Shetye | 2018-06-25 18:20:39 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-26 11:06:22 +0530 |
commit | 7465daea85285ba7f291b6bf6ddc45caa9e7ad65 (patch) | |
tree | e8e3e4dd60d469c290d55de15644ddbc1e013bc6 /js/Sources/RAMP.js | |
parent | 7c70459c10aed0d74ee03896abaf47fefdbf7c8f (diff) | |
download | sci2js-7465daea85285ba7f291b6bf6ddc45caa9e7ad65.tar.gz sci2js-7465daea85285ba7f291b6bf6ddc45caa9e7ad65.tar.bz2 sci2js-7465daea85285ba7f291b6bf6ddc45caa9e7ad65.zip |
add spacing to end of block also
Diffstat (limited to 'js/Sources/RAMP.js')
-rw-r--r-- | js/Sources/RAMP.js | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js index add6822e..7453d2d0 100644 --- a/js/Sources/RAMP.js +++ b/js/Sources/RAMP.js @@ -16,31 +16,32 @@ function RAMP() { model.dep_ut = [false,true]; exprs = [string(rpar)]; gr_i = []; - x = standard_define([2,2],model,exprs,gr_i); + this.x = standard_define([2,2],model,exprs,gr_i); } RAMP.prototype.details = function RAMP() { + return this.x; } RAMP.prototype.get = function RAMP() { } RAMP.prototype.set = function RAMP() { - x = arg1; + this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,slope,stt,iout,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"RAMP")],[" "],[gettext("Ramp function")],[" "]],[[gettext("Slope")],[gettext("Start Time")],[gettext("Initial Value")]],list("vec",1,"vec",1,"vec",1),exprs); - if (!ok) { -break; -} - if (stt<0) { -block_parameter_error(msprintf(gettext("Wrong value for \'Start Time\' parameter: %e."),stt),gettext("Null or positive integer expected.")); - } else { - model.rpar = [[slope],[stt],[iout]]; - graphics.exprs = exprs; - x.graphics = graphics; - x.model = model; -break; -} -} + [ok,slope,stt,iout,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"RAMP")],[" "],[gettext("Ramp function")],[" "]],[[gettext("Slope")],[gettext("Start Time")],[gettext("Initial Value")]],list("vec",1,"vec",1,"vec",1),exprs); + if (!ok) { + break; + } + if (stt<0) { + block_parameter_error(msprintf(gettext("Wrong value for \'Start Time\' parameter: %e."),stt),gettext("Null or positive integer expected.")); + } else { + model.rpar = [[slope],[stt],[iout]]; + graphics.exprs = exprs; + this.x.graphics = graphics; + this.x.model = model; + break; + } + } } } |