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/CURV_f.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/CURV_f.js')
-rw-r--r-- | js/Sources/CURV_f.js | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/js/Sources/CURV_f.js b/js/Sources/CURV_f.js index f9f00cb5..cd6199a9 100644 --- a/js/Sources/CURV_f.js +++ b/js/Sources/CURV_f.js @@ -16,14 +16,15 @@ function CURV_f() { model.blocktype = "c"; model.dep_ut = [false,true]; gr_i = []; - x = standard_define([2,2],model,[],gr_i); + this.x = standard_define([2,2],model,[],gr_i); } CURV_f.prototype.details = function CURV_f() { + return this.x; } CURV_f.prototype.get = function CURV_f() { } CURV_f.prototype.set = function CURV_f() { - x = arg1; + this.x = arg1; model = arg1.model; graphics = arg1.graphics; rpar = model.rpar; @@ -33,31 +34,31 @@ function CURV_f() { yy = rpar.slice(n+1-1,2*n); gc = list(rpar.slice(2*n+1-1,2*n+4),ipar.slice(2-1,5)); while (true) { -[ln,fun]=where() - if (!or(fun=="do_eval")) { - [xx,yy,ok,gc] = edit_curv(xx,yy,"axy",[" "," "," "],gc); - } else { - ok = true; -} - if (!ok) { -break; -} - n = size(xx,"*"); - if (or(xx.slice(2-1,n)-xx.slice(1-1,n-1)<0)) { -message("You have not defined a function"); - ok = false; -} - if (ok) { - model.sim = "intplt"; - model.firing = []; - rect = gc[1-1]; - model.rpar = [[xx.slice()],[yy.slice()],[rect.slice()]]; - axisdata = gc[2-1]; - model.ipar = [[size(xx,"*")],[axisdata.slice()]]; - x.graphics = graphics; - x.model = model; -break; -} -} + [ln,fun]=where() + if (!or(fun=="do_eval")) { + [xx,yy,ok,gc] = edit_curv(xx,yy,"axy",[" "," "," "],gc); + } else { + ok = true; + } + if (!ok) { + break; + } + n = size(xx,"*"); + if (or(xx.slice(2-1,n)-xx.slice(1-1,n-1)<0)) { + message("You have not defined a function"); + ok = false; + } + if (ok) { + model.sim = "intplt"; + model.firing = []; + rect = gc[1-1]; + model.rpar = [[xx.slice()],[yy.slice()],[rect.slice()]]; + axisdata = gc[2-1]; + model.ipar = [[size(xx,"*")],[axisdata.slice()]]; + this.x.graphics = graphics; + this.x.model = model; + break; + } + } } } |