From 44a3807a94783e831070f0e003340af58dc64d16 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Wed, 11 Jul 2018 17:51:05 +0530 Subject: change graphics to object --- js/Misc/c_block.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'js/Misc/c_block.js') diff --git a/js/Misc/c_block.js b/js/Misc/c_block.js index fd3573df..095a6fa1 100644 --- a/js/Misc/c_block.js +++ b/js/Misc/c_block.js @@ -49,8 +49,8 @@ function c_block() { this.lab = arguments[0]["lab"] this.x = arg1; this.model = arg1.model; - var graphics = arg1.graphics; - var label = graphics.exprs; + this.graphics = arg1.graphics; + var label = this.graphics.exprs; while (true) { [ok,this.i,this.o,this.rpar,this.funam,this.lab] = scicos_getvalue("Set C_block parameters",["input ports sizes","output port sizes","System parameters vector","function name"],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]); if (!ok) { @@ -69,23 +69,23 @@ function c_block() { if (this.model.sim[1-1]!=this.funam||size(this.model.in1,"*")!=size(this.i,"*")||size(this.model.out,"*")!=size(this.o,"*")) { var tt = []; } - var tmpvar0 = CFORTR(this.funam,tt,this.i,this.o) - var ok = tmpvar0[0] + var tmpvar0 = CFORTR(this.funam,tt,this.i,this.o); + var ok = tmpvar0[0]; var tt = tmpvar0[1]; if (!ok) { break; } - var tmpvar1 = check_io(this.model,graphics,this.i,this.o,[],[]) - this.model = tmpvar1[0] - var graphics = tmpvar1[1] + var tmpvar1 = check_io(this.model,this.graphics,this.i,this.o,[],[]); + this.model = tmpvar1[0]; + this.graphics = tmpvar1[1]; var ok = tmpvar1[2]; if (ok) { - this.model.sim[1] = new ScilabString([this.funam]); + this.model.sim[1-1] = new ScilabString([this.funam]); this.model.rpar = new ScilabDouble(this.rpar); label[2-1] = tt; this.x.model = this.model; - graphics.exprs = label; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([label]); + this.x.graphics = this.graphics; break; } } -- cgit