From 214ade87a6cef2bf55f9b9f2848ffafc02f37f18 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Thu, 12 Jul 2018 23:16:08 +0530 Subject: add more global variables --- js/Events/EVTDLY_f.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'js/Events/EVTDLY_f.js') diff --git a/js/Events/EVTDLY_f.js b/js/Events/EVTDLY_f.js index ebf8f365..b3e8f166 100644 --- a/js/Events/EVTDLY_f.js +++ b/js/Events/EVTDLY_f.js @@ -11,9 +11,9 @@ function EVTDLY_f() { this.model.blocktype = new ScilabString(["d"]); this.model.firing = new ScilabDouble([this.ff]); this.model.dep_ut = new ScilabDouble([false,false]); - var exprs = [[string(this.dt)],[sci2exp(this.ff)]]; - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EVTDLY_f\",sz(1),sz(2));"]); - this.x = standard_define([2,2],this.model,exprs,gr_i); + this.exprs = [[string(this.dt)],[sci2exp(this.ff)]]; + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EVTDLY_f\",sz(1),sz(2));"]); + this.x = standard_define([2,2],this.model,this.exprs,this.gr_i); return new BasicBlock(this.x); } EVTDLY_f.prototype.details = function EVTDLY_f() { @@ -29,12 +29,13 @@ function EVTDLY_f() { EVTDLY_f.prototype.set = function EVTDLY_f() { this.dt = parseFloat(arguments[0]["dt"]) this.ff = parseFloat(arguments[0]["ff"]) + this.exprs = arguments[0]["exprs"] this.x = arg1; this.graphics = arg1.graphics; - var exprs = this.graphics.exprs; + this.exprs = this.graphics.exprs; this.model = arg1.model; while (true) { - [ok,this.dt,this.ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" if no initial event required"]],["Delay","Date of initial output event"],list("vec",1,"vec",1),exprs); + [ok,this.dt,this.ff,this.exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" if no initial event required"]],["Delay","Date of initial output event"],list("vec",1,"vec",1),this.exprs); if (!ok) { break; } @@ -43,7 +44,7 @@ function EVTDLY_f() { var ok = false; } if (ok) { - this.graphics.exprs = new ScilabDouble([exprs]); + this.graphics.exprs = new ScilabDouble([this.exprs]); this.model.rpar = new ScilabDouble([this.dt]); this.model.firing = new ScilabDouble([this.ff]); this.x.graphics = this.graphics; -- cgit