diff options
Diffstat (limited to 'js/Misc/EDGETRIGGER.js')
-rw-r--r-- | js/Misc/EDGETRIGGER.js | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/js/Misc/EDGETRIGGER.js b/js/Misc/EDGETRIGGER.js index fc4f063f..a91acc88 100644 --- a/js/Misc/EDGETRIGGER.js +++ b/js/Misc/EDGETRIGGER.js @@ -13,27 +13,28 @@ function EDGETRIGGER() { model.dep_ut = [true,false]; exprs = [string(edge)]; gr_i = []; - x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],model,exprs,gr_i); } EDGETRIGGER.prototype.details = function EDGETRIGGER() { + return this.x; } EDGETRIGGER.prototype.get = function EDGETRIGGER() { } EDGETRIGGER.prototype.set = function EDGETRIGGER() { - x = arg1; + this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,edge,exprs] = scicos_getvalue("Set edge trigger block parameters",["rising (1), falling (-1), both (0)"],list("vec",1),exprs); - if (!ok) { -break; -} - model.ipar = sign(edge); - graphics.exprs = exprs; - x.graphics = graphics; - x.model = model; -break; -} + [ok,edge,exprs] = scicos_getvalue("Set edge trigger block parameters",["rising (1), falling (-1), both (0)"],list("vec",1),exprs); + if (!ok) { + break; + } + model.ipar = sign(edge); + graphics.exprs = exprs; + this.x.graphics = graphics; + this.x.model = model; + break; + } } } |