diff options
author | Sunil Shetye | 2018-06-26 14:59:47 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-26 14:59:47 +0530 |
commit | eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 (patch) | |
tree | 6378935263fe5cafd389b6893ac3b37a1dd4b1a7 /js/Sinks/BARXY.js | |
parent | afed64f1a0eab0b2d742088186d7bc340a2c895b (diff) | |
download | sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.gz sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.bz2 sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.zip |
add return value from scicos_getvalue to global vars
Diffstat (limited to 'js/Sinks/BARXY.js')
-rw-r--r-- | js/Sinks/BARXY.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/js/Sinks/BARXY.js b/js/Sinks/BARXY.js index 4ef60a20..e932c6a1 100644 --- a/js/Sinks/BARXY.js +++ b/js/Sinks/BARXY.js @@ -2,10 +2,10 @@ function BARXY() { BARXY.prototype.define = function BARXY() { model = scicos_model(); - xmin = -15; - xmax = 15; - ymin = -15; - ymax = 15; + this.xmin = -15; + this.xmax = 15; + this.ymin = -15; + this.ymax = 15; model.sim = list("BARXY_sim",5); model.blocktype = "d"; model.dep_ut = [true,false]; @@ -13,7 +13,7 @@ function BARXY() { model.intyp = [1]; model.out = []; model.evtin = [1]; - model.rpar = [[xmin],[xmax],[ymin],[ymax]]; + model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]]; model.ipar = 1; this.x = standard_define([2,2],model,[],[]); this.x.graphics.in_implicit = ["E","E"]; @@ -32,28 +32,28 @@ function BARXY() { exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,xmin,xmax,ymin,ymax,thickness,exprs] = scicos_getvalue("Set Scope parameters",[["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Segs Thickness"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); + [ok,this.xmin,this.xmax,this.ymin,this.ymax,this.thickness,exprs] = scicos_getvalue("Set Scope parameters",[["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Segs Thickness"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); if (!ok) { break; } mess = []; - if (ymin>=ymax) { + if (this.ymin>=this.ymax) { mess = [[mess],["Ymax must be greater than Ymin"],[" "]]; ok = false; } - if (xmin>=xmax) { + if (this.xmin>=this.xmax) { mess = [[mess],["Xmax must be greater than Xmin"],[" "]]; ok = false; } - if (thickness<=0) { + if (this.thickness<=0) { mess = [[mess],["Thickness must be strictly positive."]]; ok = false; } if (!ok) { message(mess); } else { - model.rpar = [[xmin],[xmax],[ymin],[ymax]]; - model.ipar = thickness; + model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]]; + model.ipar = this.thickness; graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = model; |