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/GEN_SQR.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/GEN_SQR.js')
-rw-r--r-- | js/Sources/GEN_SQR.js | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js index 212d5ab4..4565cb48 100644 --- a/js/Sources/GEN_SQR.js +++ b/js/Sources/GEN_SQR.js @@ -47,9 +47,10 @@ function GEN_SQR() { F = 1; exprs = [sci2exp(Amin),sci2exp(Amax),sci2exp(rule),sci2exp(F)]; gr_i = []; - x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],model,exprs,gr_i); } GEN_SQR.prototype.details = function GEN_SQR() { + return this.x; } GEN_SQR.prototype.get = function GEN_SQR() { } @@ -64,28 +65,28 @@ function GEN_SQR() { Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]]; Ss = list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1); scicos_context = struct(); - x = arg1; + this.x = arg1; ok = false; while (!ok) { - [ok,scicos_context.Amin,scicos_context.Amax,scicos_context.rule,scicos_context.F,exprs] = scicos_getvalue(Btitre,Bitems,Ss,exprs); - if (!ok) { -return; -} - PREVAR_scicos_context = scicos_context; - sblock = x.model.rpar; - [PREVAR_scicos_context,ierr] = script2var(sblock.props.context,PREVAR_scicos_context); - if (ierr==0) { - [sblock,%w,needcompile2,ok] = do_eval(sblock,list()); - if (ok) { - y = max(2,this.needcompile,needcompile2); - x.graphics.exprs = exprs; - x.model.rpar = sblock; -break; -} - } else { -message(lasterror()); - ok = false; -} -} + [ok,scicos_context.Amin,scicos_context.Amax,scicos_context.rule,scicos_context.F,exprs] = scicos_getvalue(Btitre,Bitems,Ss,exprs); + if (!ok) { + return; + } + PREVAR_scicos_context = scicos_context; + sblock = this.x.model.rpar; + [PREVAR_scicos_context,ierr] = script2var(sblock.props.context,PREVAR_scicos_context); + if (ierr==0) { + [sblock,%w,needcompile2,ok] = do_eval(sblock,list()); + if (ok) { + y = max(2,this.needcompile,needcompile2); + this.x.graphics.exprs = exprs; + this.x.model.rpar = sblock; + break; + } + } else { + message(lasterror()); + ok = false; + } + } } } |