summaryrefslogtreecommitdiff
path: root/js/Sinks/BARXY.js
diff options
context:
space:
mode:
authorSunil Shetye2018-06-25 18:20:39 +0530
committerSunil Shetye2018-06-26 11:06:22 +0530
commit7465daea85285ba7f291b6bf6ddc45caa9e7ad65 (patch)
treee8e3e4dd60d469c290d55de15644ddbc1e013bc6 /js/Sinks/BARXY.js
parent7c70459c10aed0d74ee03896abaf47fefdbf7c8f (diff)
downloadsci2js-7465daea85285ba7f291b6bf6ddc45caa9e7ad65.tar.gz
sci2js-7465daea85285ba7f291b6bf6ddc45caa9e7ad65.tar.bz2
sci2js-7465daea85285ba7f291b6bf6ddc45caa9e7ad65.zip
add spacing to end of block also
Diffstat (limited to 'js/Sinks/BARXY.js')
-rw-r--r--js/Sinks/BARXY.js67
1 files changed, 34 insertions, 33 deletions
diff --git a/js/Sinks/BARXY.js b/js/Sinks/BARXY.js
index 3cdddd4d..e1845489 100644
--- a/js/Sinks/BARXY.js
+++ b/js/Sinks/BARXY.js
@@ -15,48 +15,49 @@ function BARXY() {
model.evtin = [1];
model.rpar = [[xmin],[xmax],[ymin],[ymax]];
model.ipar = 1;
- x = standard_define([2,2],model,[],[]);
- x.graphics.in_implicit = ["E","E"];
- x.graphics.out_implicit = [];
- x.graphics.exprs = [["-15"],["15"],["-15"],["15"],["1"]];
+ this.x = standard_define([2,2],model,[],[]);
+ this.x.graphics.in_implicit = ["E","E"];
+ this.x.graphics.out_implicit = [];
+ this.x.graphics.exprs = [["-15"],["15"],["-15"],["15"],["1"]];
}
BARXY.prototype.details = function BARXY() {
+ return this.x;
}
BARXY.prototype.get = function BARXY() {
}
BARXY.prototype.set = function BARXY() {
- x = arg1;
+ this.x = arg1;
graphics = arg1.graphics;
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);
- if (!ok) {
-break;
-}
- mess = [];
- if (ymin>=ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
-}
- if (xmin>=xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
-}
- if (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;
- graphics.exprs = exprs;
- x.graphics = graphics;
- x.model = model;
-break;
-}
-}
+ [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);
+ if (!ok) {
+ break;
+ }
+ mess = [];
+ if (ymin>=ymax) {
+ mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ ok = false;
+ }
+ if (xmin>=xmax) {
+ mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ ok = false;
+ }
+ if (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;
+ graphics.exprs = exprs;
+ this.x.graphics = graphics;
+ this.x.model = model;
+ break;
+ }
+ }
}
}