diff options
Diffstat (limited to 'js/Misc/PENDULUM_ANIM.js')
-rw-r--r-- | js/Misc/PENDULUM_ANIM.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Misc/PENDULUM_ANIM.js b/js/Misc/PENDULUM_ANIM.js index 0e265168..1faf9f7f 100644 --- a/js/Misc/PENDULUM_ANIM.js +++ b/js/Misc/PENDULUM_ANIM.js @@ -16,9 +16,9 @@ function PENDULUM_ANIM() { this.model.rpar = new ScilabDouble([this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]); this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = new ScilabDouble([false,false]); - var exprs = string(this.model.rpar); - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PENDULUM_ANIM\",sz(1),sz(2));"]); - this.x = standard_define([3,3],this.model,exprs,gr_i); + this.exprs = string(this.model.rpar); + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PENDULUM_ANIM\",sz(1),sz(2));"]); + this.x = standard_define([3,3],this.model,this.exprs,this.gr_i); return new BasicBlock(this.x); } PENDULUM_ANIM.prototype.details = function PENDULUM_ANIM() { @@ -44,13 +44,14 @@ function PENDULUM_ANIM() { this.xmax = parseFloat(arguments[0]["xmax"]) this.ymin = parseFloat(arguments[0]["ymin"]) this.ymax = parseFloat(arguments[0]["ymax"]) + 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; var dstate = this.model.dstate; while (true) { - [ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",["pendulum length","cart size (square side)","slope","Xmin","Xmax","Ymin","Ymax"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); + [ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,this.exprs] = scicos_getvalue("Set Scope parameters",["pendulum length","cart size (square side)","slope","Xmin","Xmax","Ymin","Ymax"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); if (!ok) { break; } @@ -72,7 +73,7 @@ function PENDULUM_ANIM() { } else { var rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]]; this.model.rpar = new ScilabDouble(rpar); - this.graphics.exprs = new ScilabDouble([exprs]); + this.graphics.exprs = new ScilabDouble([this.exprs]); this.x.graphics = this.graphics; this.x.model = this.model; break; |