diff options
Diffstat (limited to 'js/Branching/GOTOMO.js')
-rw-r--r-- | js/Branching/GOTOMO.js | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/js/Branching/GOTOMO.js b/js/Branching/GOTOMO.js index 8ab01276..1ed448ab 100644 --- a/js/Branching/GOTOMO.js +++ b/js/Branching/GOTOMO.js @@ -18,42 +18,43 @@ function GOTOMO() { mo.inputs = "p"; exprs = [["A"],[sci2exp(1)]]; gr_i = []; - x = standard_define([2,1],model,exprs,gr_i); - x.graphics.in_implicit = ["I"]; + this.x = standard_define([2,1],model,exprs,gr_i); + this.x.graphics.in_implicit = ["I"]; } GOTOMO.prototype.details = function GOTOMO() { + return this.x; } GOTOMO.prototype.get = function GOTOMO() { } GOTOMO.prototype.set = function GOTOMO() { - x = arg1; + this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,tag,tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs); - if (!ok) { -break; -} - tagvis = int(tagvis); - if (((tagvis<1)||(tagvis>3))) { -message("Tag Visibility must be between 1 and 3"); - ok = false; -} - if (ok) { - if (((model.ipar!=tagvis)||(model.opar!=list(tag)))) { - needcompile = 4; - y = needcompile; -} - graphics.exprs = exprs; - model.opar = list(tag); - model.ipar = tagvis; - x.model = model; - x.graphics = graphics; - arg1 = x; -break; -} -} -needcompile=resume(needcompile) + [ok,tag,tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs); + if (!ok) { + break; + } + tagvis = int(tagvis); + if (((tagvis<1)||(tagvis>3))) { + message("Tag Visibility must be between 1 and 3"); + ok = false; + } + if (ok) { + if (((model.ipar!=tagvis)||(model.opar!=list(tag)))) { + needcompile = 4; + y = needcompile; + } + graphics.exprs = exprs; + model.opar = list(tag); + model.ipar = tagvis; + this.x.model = model; + this.x.graphics = graphics; + arg1 = this.x; + break; + } + } + needcompile=resume(needcompile) } } |