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/PULSE_SC.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/PULSE_SC.js')
-rw-r--r-- | js/Sources/PULSE_SC.js | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js index 00dd65d2..51ca49a5 100644 --- a/js/Sources/PULSE_SC.js +++ b/js/Sources/PULSE_SC.js @@ -42,9 +42,10 @@ function PULSE_SC() { A = 1; exprs = [sci2exp(E),sci2exp(W),sci2exp(F),sci2exp(A)]; gr_i = []; - x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],model,exprs,gr_i); } PULSE_SC.prototype.details = function PULSE_SC() { + return this.x; } PULSE_SC.prototype.get = function PULSE_SC() { } @@ -59,30 +60,30 @@ function PULSE_SC() { Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]]; Ss = list("pol",-1,"pol",-1,"pol",-1,"mat",[-1,-1]); scicos_context = struct(); - x = arg1; + this.x = arg1; ok = false; while (!ok) { - [ok,scicos_context.E,scicos_context.W,scicos_context.F,scicos_context.A,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 { - if ((lasterror()!=[])) { -messagebox(lasterror()); -} - ok = false; -} -} + [ok,scicos_context.E,scicos_context.W,scicos_context.F,scicos_context.A,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 { + if ((lasterror()!=[])) { + messagebox(lasterror()); + } + ok = false; + } + } } } |