summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChhavi22082016-06-06 10:14:42 +0530
committerChhavi22082016-06-06 10:14:42 +0530
commit5d6b3f6d270d60cdf267e7e183c72c9cb4f7e012 (patch)
treeea099f66a21d8655212906ec77f0da8b65865f0d
parentecd382ad3ad98423edf4790c21107d976064557e (diff)
downloadxcos-on-web-5d6b3f6d270d60cdf267e7e183c72c9cb4f7e012.tar.gz
xcos-on-web-5d6b3f6d270d60cdf267e7e183c72c9cb4f7e012.tar.bz2
xcos-on-web-5d6b3f6d270d60cdf267e7e183c72c9cb4f7e012.zip
Implement ANDLOG and CONST_m
-rw-r--r--details.js1247
-rw-r--r--index.html268
2 files changed, 752 insertions, 763 deletions
diff --git a/details.js b/details.js
index f035fe2..6b03638 100644
--- a/details.js
+++ b/details.js
@@ -1,14 +1,10 @@
+// All arrays - separated by ',' or ';' or ' ' are taken to be 1 Dimensional
// Only during printing, their nomenclature will change
// Good read: http://javascript.info/tutorial/arguments#keyword-arguments
/*
Author name: ASP1234, Chhavi2208
*/
/*
-function findModel() {
- var model = ["model", "sim", "in", "in2", "intyp", "out", "out2", "outtyp", "evtin", "evtout", "state", "dstate", "odstate", "rpar", "ipar", "opar", "blocktype", "firing", "dep_ut", "label", "nzcross", "nmode", "equations", "uid"];
- return model.indexOf(arguments[0]);
-}
-
function findBlock() {
var block = ["Block", "graphics", "model", "gui", "doc"];
return block.indexOf(arguments[0]);
@@ -19,745 +15,680 @@ function findGraphics() {
var graphics = ["graphics", "orig", "sz", "flip", "theta", "exprs", "pin", "pout", "pein", "peout", "gr_i", "id", "in_implicit", "out_implicit", "in_style", "out_style", "in_label", "out_label", "style"];
return graphics.indexOf(arguments[0]);
}
+
+function findModel() {
+ var model = ["model", "sim", "in", "in2", "intyp", "out", "out2", "outtyp", "evtin", "evtout", "state", "dstate", "odstate", "rpar", "ipar", "opar", "blocktype", "firing", "dep_ut", "label", "nzcross", "nmode", "equations", "uid"];
+ return model.indexOf(arguments[0]);
+}
*/
+//block begin
+/*
+const graphics = 1;
+const model = 2;
+const gui = 3;
+const doc = 4;
+//block ends
+
//graphics start
-const orig=1;
-const sz=2;
-const flip=3;
-const theta=4;
-const exprs=5;
-const pin=6;
-const pout=7;
-const pein=8;
-const peout=9;
-const gr_i=10;
-const id=11;
-const in_implicit=12;
-const out_implicit=13;
-const in_style=14;
-const out_style=15;
-const in_label=16;
-const out_label=17;
-const style=18;
+const orig = 1;
+const sz = 2;
+const flip = 3;
+const theta = 4;
+const exprs = 5;
+const pin = 6;
+const pout = 7;
+const pein = 8;
+const peout = 9;
+const gr_i = 10;
+const id = 11;
+const in_implicit = 12;
+const out_implicit = 13;
+const in_style = 14;
+const out_style = 15;
+const in_label = 16;
+const out_label = 17;
+const style = 18;
// graphics end
//model begins
-const sim=1;
-const in1=2; //Can't use 'in' as const name -- keyword in javascript
-const in2=3;
-const intyp=4;
-const out=5;
-const out2=6;
-const outtyp=7;
-const evtin=8;
-const evtout=9;
-const state=10;
-const dstate=11;
-const odstate=12;
-const rpar=13;
-const ipar=14;
-const opar=15;
-const blocktype=16;
-const firing=17;
-const dep_ut=18;
-const label=19;
-const nzcross=20;
-const nmode=21;
-const equations=22;
-const uid=23;
+const sim = 1;
+const in1 = 2; //Can"t use "in" as const name -- keyword in javascript
+const in2 = 3;
+const intyp = 4;
+const out = 5;
+const out2 = 6;
+const outtyp = 7;
+const evtin = 8;
+const evtout = 9;
+const state = 10;
+const dstate = 11;
+const odstate = 12;
+const rpar = 13;
+const ipar = 14;
+const opar = 15;
+const blocktype = 16;
+const firing = 17;
+const dep_ut = 18;
+const label = 19;
+const nzcross = 20;
+const nmode = 21;
+const equations = 22;
+const uid = 23;
//model ends
-//block begin
-const graphics=1;
-const model=2;
-const gui=3;
-const doc=4;
-//block ends
-
//Diagram begins
-const props=1;
-const objs=2;
-const version=3;
-const contrib=4;
+const props = 1;
+const objs = 2;
+const version = 3;
+const contrib = 4;
//Diagram ends
//Params begins
-const wpar=1;
-const title=2;
-const tol=3;
-const tf=4;
-const context=5;
-const void1=6;
-const options=7;
-const void2=8;
-const void3=9;
+const wpar = 1;
+const title = 2;
+const tol = 3;
+const tf = 4;
+const context = 5;
+const void1 = 6;
+const options = 7;
+const void2 = 8;
+const void3 = 9;
//const doc=10;
//Params ends
//Default options begins
-const D3=1; // 3D
-const Background=2;
-const Link=3;
-const ID=4;
-const Cmap=5;
+const D3 = 1; // 3D
+const Background = 2;
+const Link = 3;
+const ID = 4;
+const Cmap = 5;
//Default options ends
-
+*/
function scicos_block() {
- var options = arguments[0] || new Object();
- var i = 0;
- var l = 0;
-
- this.type = new ScilabString(new data("block", i++, l), new data("graphics", i++, l), new data("model", i++, l), new data("gui", i++, l), new data("docs", i++, l));
- this.graphics = options.graphics || new scicos_graphics();
- this.model = options.model || new scicos_model();
- this.gui = options.gui || new ScilabString();
- this.docs = options.docs || list();
+ var options = arguments[0] || new Object();
+ var block_type = ["block", "graphics", "model", "gui", "docs"];
+ this.block = new ScilabString(block_type);
+ this.graphics = options.graphics || new scicos_graphics();
+ this.model = options.model || new scicos_model();
+ this.gui = options.gui || new ScilabString();
+ this.docs = options.docs || list();
+
+ return mlist(block_type, this.block, this.graphics, this.model, this.gui, this.docs);
+}
- return mlist(this.type, this.graphics, this.model, this.gui, this.docs);
+function standard_define() {
+ var sz = arguments[0];
+ var model = arguments[1];
+ var label = arguments[2];
+ var gr_i = arguments[3] || new ScilabString();
+
+ var pin = new ScilabDouble();
+ var pout = new ScilabDouble();
+ var pein = new ScilabDouble();
+ var peout = new ScilabDouble();
+
+ var nin = model.in.length;
+ if (nin > 0) {
+ pin = zeros(nin);
+ }
+ var nout = model.out.length;
+ if (nout > 0) {
+ pout = zeros(nout);
+ }
+ var ncin = model.evtin.length;
+ if (ncin > 0) {
+ pein = zeros(ncin);
+ }
+ var ncout = model.evtout.length;
+ if (ncout > 0) {
+ peout = zeros(ncout);
+ }
+
+ gr_i = list(gr_i, new ScilabDouble([8]));
+
+ if (gr_i[1] == []) {
+ gr_i[1] = new ScilabDouble([8]);
+ }
+ if (gr_i[1] == 0) {
+ gr_i[1] = new ScilabDouble();
+ }
+
+ var graphics_options = {
+ sz: sz,
+ pin: pin,
+ pout: pout,
+ pein: pein,
+ peout: peout,
+ gr_i: gr_i,
+ exprs: label
+ };
+ var graphics = new scicos_graphics(graphics_options);
+ var block_options = {
+ graphics: graphics,
+ model: model,
+ gui: new ScilabString([arguments.callee.caller.name])
+ };
+ return new scicos_block(block_options);
}
-function scicos_graphics() {
- var options = arguments[0] || new Object();
- var i = 0;
- var l = 0;
-
- this.type = new ScilabString(new data("graphics", i++, l), new data("orig", i++, l), new data("sz", i++, l), new data("flip", i++, l), new data("theta", i++, l), new data("exprs", i++, l), new data("pin", i++, l), new data("pout", i++, l), new data("pein", i++, l), new data("peout", i++, l), new data("gr_i", i++, l), new data("id", i++, l), new data("in_implicit", i++, l), new data("out_implicit", i++, l), new data("in_style", i++, l), new data("out_style", i++, l), new data("in_label", i++, l), new data("out_label", i++, l), new data("style", i++, l));
- this.orig = options.orig || new ScilabDouble(new data(0, 0, 0), new data(0, 1, 0));
- this.sz = options.sz || new ScilabDouble(new data(80, 0, 0), new data(80, 1, 0));
- this.flip = options.flip || new ScilabBoolean(new data("true", 0, 0));
- this.theta = options.theta || new ScilabDouble(new data(0, 0, 0));
- this.exprs = options.exprs || new ScilabDouble();
- this.pin = options.pin || new ScilabDouble();;
- this.pout = options.pout || new ScilabDouble();;
- this.pein = options.pein || new ScilabDouble();;
- this.peout = options.peout || new ScilabDouble();;
- this.gr_i = options.gr_i || new ScilabString();
- this.id = options.id || new ScilabString(new data("", 0, 0));
- this.in_implicit = options.in_implicit || new ScilabDouble();
- this.out_implicit = options.out_implicit || new ScilabDouble();
- this.in_style = options.in_style || new ScilabDouble();
- this.out_style = options.out_style || new ScilabDouble();
- this.in_label = options.in_label || new ScilabDouble();
- this.out_label = options.out_label || new ScilabDouble();
- this.style = options.style || new ScilabString();
-
- return mlist(this.type, this.orig, this.sz, this.flip, this.theta, this.exprs, this.pin, this.pout, this.pein, this.peout, this.gr_i, this.id, this.in_implicit, this.out_implicit, this.in_style, this.out_style, this.in_label, this.out_label, this.style);
+//Returns ScilabDouble which contains a list with size =n and all values=0
+function zeros(n) {
+ var arg = new Array(n + 1).join("0").split("").map(parseFloat);
+ var port = new ScilabDouble();
+ var i = 0;
+ for (i = 0; i < arg[0].length; i++)
+ port.list.push(arg[0][i]);
+ return port;
}
-function standard_define() {
- var sz = arguments[0];
- var model = arguments[1];
- var label = arguments[2];
- var gr_i = arguments[3] || new ScilabString();
-
- var pin = new ScilabDouble();
- var pout = new ScilabDouble();
- var pein = new ScilabDouble();
- var peout = new ScilabDouble();
-
- var nin = model[in1].length;
- if (nin > 0) {
- pin = zeros(nin);
- }
- var nout = model[out].length;
- if (nout > 0) {
- pout = zeros(nout);
- }
- var ncin = model[evtin].length;
- if (ncin > 0) {
- pein = zeros(ncin);
- }
- var ncout = model[evtout].length;
- if (ncout > 0) {
- peout = zeros(ncout);
- }
-
- gr_i = list(gr_i, new ScilabDouble(new data(8, 0, 0)));
-
- if (gr_i[1] == []) {
- gr_i[1] = new ScilabDouble(new data(8, 0, 0));
- }
- if (gr_i[1] == 0) {
- gr_i[1] = new ScilabDouble();
- }
-
- var graphics_options = {
- sz: sz,
- pin: pin,
- pout: pout,
- pein: pein,
- peout: peout,
- gr_i: gr_i,
- exprs: label
- };
- var graphics = new scicos_graphics(graphics_options);
- var block_options = {
- graphics: graphics,
- model: model,
- gui: new ScilabString(new data(arguments.callee.caller.name, 0, 0))
- };
- return new scicos_block(block_options);
-}
-function ScilabString() {
- var i = 0;
-
- for (i = 0; i < arguments.length; i++)
- this['data' + i] = arguments[i];
- if(arguments.length>1)
- {
- if(arguments[arguments.length-1].line>0)
- {
- this.height=arguments.length;
- this.width=arguments[0].column+1;
- }
- else
- {
- this.height = arguments[0].line+1;
- this.width = arguments.length;
- }
- }
+function scicos_graphics() {
+ var options = arguments[0] || new Object();
+ var graphics_type = ["graphics", "orig", "sz", "flip", "theta", "exprs", "pin", "pout", "pein", "peout", "gr_i", "id", "in_implicit", "out_implicit", "in_style", "out_style", "in_label", "out_label", "style"];
+ this.graphics = new ScilabString(graphics_type);
+ this.orig = options.orig || new ScilabDouble([0, 0]);
+ this.sz = options.sz || new ScilabDouble([80, 80]);
+ this.flip = options.flip || new ScilabBoolean([true]);
+ this.theta = options.theta || new ScilabDouble([0]);
+ this.exprs = options.exprs || new ScilabDouble();
+ this.pin = options.pin || new ScilabDouble();;
+ this.pout = options.pout || new ScilabDouble();;
+ this.pein = options.pein || new ScilabDouble();;
+ this.peout = options.peout || new ScilabDouble();;
+ this.gr_i = options.gr_i || new ScilabString();
+ this.id = options.id || new ScilabString([""]);
+ this.in_implicit = options.in_implicit || new ScilabDouble();
+ this.out_implicit = options.out_implicit || new ScilabDouble();
+ this.in_style = options.in_style || new ScilabDouble();
+ this.out_style = options.out_style || new ScilabDouble();
+ this.in_label = options.in_label || new ScilabDouble();
+ this.out_label = options.out_label || new ScilabDouble();
+ this.style = options.style || new ScilabString();
+
+ return mlist(graphics_type, this.graphics, this.orig, this.sz, this.flip, this.theta, this.exprs, this.pin, this.pout, this.pein, this.peout, this.gr_i, this.id, this.in_implicit, this.out_implicit, this.in_style, this.out_style, this.in_label, this.out_label, this.style);
}
-function ScilabBoolean() {
- var i = 0;
-
- for (i = 0; i < arguments.length; i++)
- this['data' + i] = arguments[i];
- if(arguments.length>1)
- {
- if(arguments[arguments.length-1].line>0)
- {
- this.height=arguments.length;
- this.width=arguments[0].column+1;
- }
- else
- {
- this.height = arguments[0].line+1;
- this.width = arguments.length;
- }
- }
+function scicos_model() {
+ var options = arguments[0] || new Object();
+ var model_type = ["model", "sim", "in", "in2", "intyp", "out", "out2", "outtyp", "evtin", "evtout", "state", "dstate", "odstate", "rpar", "ipar", "opar", "blocktype", "firing", "dep_ut", "label", "nzcross", "nmode", "equations", "uid"];
+ this.model = new ScilabString(model_type);
+ this.sim = options.sim || new ScilabString();
+ this.in = options.in || new ScilabDouble();
+ this.in2 = options.in2 || new ScilabDouble();
+ this.intyp = options.intyp || new ScilabDouble(); //[1]
+ this.out = options.out || new ScilabDouble();
+ this.out2 = options.out2 || new ScilabDouble();
+ this.outtyp = options.outtyp || new ScilabDouble([1]);
+ this.evtin = options.evtin || new ScilabDouble();
+ this.evtout = options.evtout || new ScilabDouble();
+ this.state = options.state || new ScilabDouble();
+ this.dstate = options.dstate || new ScilabDouble();
+ this.odstate = options.odstate || list();
+ this.ipar = options.ipar || new ScilabDouble();
+ this.rpar = options.rpar || new ScilabDouble();
+ this.opar = options.opar || list(); //new ScilabDouble();
+ this.blocktype = options.blocktype || new ScilabString(["c"]);
+ this.firing = options.firing || new ScilabDouble();
+ this.dep_ut = options.dep_ut || new ScilabBoolean([false, false]);
+ this.label = options.label || new ScilabString([""]); // If label not available, use image
+ this.nzcross = options.nzcross || new ScilabDouble([0]);
+ this.nmode = options.nmode || new ScilabDouble([0]);;
+ this.equations = options.equations || list();
+ this.uid = options.uid || new ScilabString();
+
+ return mlist(model_type, this.model, this.sim, this.in, this.in2, this.intyp, this.out, this.out2, this.outtyp, this.evtin, this.evtout, this.state, this.dstate, this.odstate, this.ipar, this.rpar, this.opar, this.blocktype, this.firing, this.dep_ut, this.label, this.nzcross, this.nmode, this.equations, this.uid);
}
-function ScilabDouble() {
- var i = 0;
-
- for (i = 0; i < arguments.length; i++)
- this['data' + i] = arguments[i]
- if(arguments.length>1)
- {
- if(arguments[arguments.length-1].line>0) //@ASP1234 Inverse Array
- {
- this.height=arguments.length;
- this.width=arguments[0].column+1;
- }
- else //@ASP1234 Normal Array
- {
- this.height = arguments[0].line+1;
- this.width = arguments.length;
- }
- }
-}
-function isNumber(obj) {
- if(obj==="")
- return false;
- if(typeof obj == "string")
- return false;
- return !isNaN(obj);
-}
-function data() {
- if (isNumber(arguments[0])) {
- this.column = arguments[1];
- this.line = arguments[2];
- this.realPart = arguments[0];
- }
-
- else {
- this.column = arguments[1];
- this.line = arguments[2];
- this.value = arguments[0];
- }
+function scicos_diagram() {
+
+ var options = arguments[0] || new Object();
+ var diagram_type = ["diagram", "props", "objs", "version", "contrib"];
+ this.diagram = new ScilabString(diagram_type);
+ this.props = options.props || scicos_params();
+ this.objs = options.objs || list();
+ this.version = options.version || new ScilabString([""]);
+ this.contrib = options.contrib || list();
+ return mlist(diagram_type, this.diagram, this.props, this.objs, this.version, this.contrib);
}
-function list() {
- this.ScilabList = [];
- var i = 0;
- for (i = 0; i < arguments.length; i++)
- this.ScilabList.push(arguments[i]);
+function scicos_params() {
- this.ScilabList.scilabClass = "ScilabList";
+ var options = arguments[0] || new Object();
+ var params_type = ["params", "wpar", "title", "tol", "tf", "context", "void1", "options", "void2", "void3", "doc"];
+ this.params = new ScilabString(params_type);
+ this.wpar = options.wpar || new ScilabDouble([600, 450, 0, 0, 600, 450]);
+ this.titlex = options.title || options.Title || new ScilabString(["Untitled"]);
+ this.tf = options.tf || new ScilabDouble([100000]);
+ this.tol = options.tol || new ScilabDouble([Math.pow(10, -6)], [Math.pow(10, -6)], [Math.pow(10, -10)], [100001], [0], [1], [0]);
+ this.context = options.context || new ScilabString([""]);
+ this.void1 = new ScilabDouble();
+ this.options = options.options || new default_options();
+ this.void2 = new ScilabDouble();
+ this.void3 = new ScilabDouble();
+ this.doc = options.doc || list();
- return this.ScilabList;
+
+ return tlist(params_type, this.params, this.wpar, this.titlex, this.tol, this.tf, this.context, this.void1, this.options, this.void2, this.void3, this.doc);
}
-function mlist() {
- this.ScilabMList = [];
- var i = 0;
+function default_options() {
+
+ var options_type = ["scsopt", "3D", "Background", "Link", "ID", "Cmap"];
+ this.scsopt = new ScilabString(options_type);
+ this.D3 = list(new ScilabBoolean([true]), new ScilabDouble([33]));
+ this.Background = new ScilabDouble([8.1]);
+ this.Link = new ScilabDouble([1, 5]);
+ this.ID = list(new ScilabDouble([4, 1, 10, 1]), new ScilabDouble([4, 1, 2, 1]));
+ this.Cmap = new ScilabDouble([0.8, 0.8, 0.8]);
- for (i = 0; i < arguments.length; i++)
- this.ScilabMList.push(arguments[i]);
-
- this.ScilabMList.varName="";
- this.ScilabMList.scilabClass = "ScilabMList";
+ return tlist(options_type,this.scsopt, this.D3, this.Background, this.Link, this.ID, this.Cmap);
+}
- return this.ScilabMList;
+function scicos_link() {
+ var options = arguments[0];
+ var link_type = ["Link", "xx", "yy", "id", "thick", "ct", "from", "to"];
+ this.Link = new ScilabString(link_type);
+ this.xx = options.xx || new ScilabDouble(); //inverse array
+ this.yy = options.yy || new ScilabDouble(); //inverse array
+ this.id = options.id || new ScilabString();
+ this.thick = options.thick || new ScilabDouble([0, 0]);
+ this.ct = options.ct || new ScilabDouble([1, 1]);
+ this.from = options.from || new ScilabDouble();
+ this.to = options.xx || new ScilabDouble();
+
+ return mlist(link_type, this.Link, this.xx, this.yy, this.id, this.thick, this.ct, this.from, this.to);
}
-function tlist() {
- this.ScilabTList = [];
- var i = 0;
- for (i = 0; i < arguments.length; i++)
- this.ScilabTList.push(arguments[i]);
+function list() {
+ this.ScilabList = [];
+ for (var i = 0; i < arguments.length; i++)
+ this.ScilabList.push(arguments[i]);
- this.ScilabTList.scilabClass = "ScilabTList";
+ this.ScilabList.scilabClass = "ScilabList";
- return this.ScilabTList;
+ return this.ScilabList;
}
+function mlist() {
+ this.ScilabMList = {};
+ for (var i = 1, j = 0; i < arguments.length; i++, j++)
+ this.ScilabMList[arguments[0][j]]=arguments[i];
+
+ this.ScilabMList.varName = "";
+ this.ScilabMList.scilabClass = "ScilabMList";
+ return this.ScilabMList;
-function scicos_model() {
- var options = arguments[0] || new Object();
- var i = 0;
- var l = 0
-
- this.type = new ScilabString(new data("model", i++, l), new data("sim", i++, l), new data("in", i++, l), new data("in2", i++, l), new data("intyp", i++, l), new data("out", i++, l), new data("out2", i++, l), new data("outtyp", i++, l), new data("evtin", i++, l), new data("evtout", i++, l), new data("state", i++, l), new data("dstate", i++, l), new data("odstate", i++, l), new data("rpar", i++, l), new data("ipar", i++, l), new data("opar", i++, l), new data("blocktype", i++, l), new data("firing", i++, l), new data("dep_ut", i++, l), new data("label", i++, l), new data("nzcross", i++, l), new data("nmode", i++, l), new data("equations", i++, l), new data("uid", i++, l));
- this.sim = options.sim || new ScilabString();
- this.in = options.in || new ScilabDouble();
- this.in2 = options.in2 || new ScilabDouble();
- this.intyp = options.intyp || new ScilabDouble();//new data(1, 0, 0)
- this.out = options.out || new ScilabDouble();
- this.out2 = options.out2 || new ScilabDouble();
- this.outtyp = options.outtyp || new ScilabDouble(new data(1, 0, 0));
- this.evtin = options.evtin || new ScilabDouble();
- this.evtout = options.evtout || new ScilabDouble();
- this.state = options.state || new ScilabDouble();
- this.dstate = options.dstate || new ScilabDouble();
- this.odstate = options.odstate || list();
- this.ipar = options.ipar || new ScilabDouble();
- this.rpar = options.rpar || new ScilabDouble();
- this.opar = options.opar || list();//new ScilabDouble();
- this.blocktype = options.blocktype || new ScilabString(new data('c', 0, 0));
- this.firing = options.firing || new ScilabDouble();
- this.dep_ut = options.dep_ut || new ScilabBoolean(new data('false', 0, 0), new data('false', 1, 0));
- this.label = options.label || new ScilabString(new data("",0,0)); // If label not available, use image
- this.nzcross = options.nzcross || new ScilabDouble(new data(0, 0, 0));
- this.nmode = options.nmode || new ScilabDouble(new data(0, 0, 0));;
- this.equations = options.equations || list();
- this.uid = options.uid || new ScilabString();
-
- return mlist(this.type, this.sim, this.in, this.in2, this.intyp, this.out, this.out2, this.outtyp, this.evtin, this.evtout, this.state, this.dstate, this.odstate, this.ipar, this.rpar, this.opar, this.blocktype, this.firing, this.dep_ut, this.label, this.nzcross, this.nmode, this.equations, this.uid);
}
+function tlist() {
+ this.ScilabTList = {};
+ for (var i = 1, j = 0; i < arguments.length; i++, j++)
+ this.ScilabTList[arguments[0][j]]=arguments[i];
+ this.ScilabTList.scilabClass = "ScilabTList";
+
+ return this.ScilabTList;
-function scicos_diagram() {
-
- var options = arguments[0] || new Object();
- var i = 0;
- var l = 0;
-
- this.type2=new ScilabString(new data("diagram",i++,l),new data("props",i++,l),new data("objs",i++,l),new data("version",i++,l),new data("contrib",i++,l));
- this.props = options.props|| scicos_params();
- this.objs = options.objs || list();
- this.version = options.version || new ScilabString(new data("",0,0));
- this.contrib = options.contrib || list();
-
- return mlist(this.type2,this.props,this.objs,this.version,this.contrib);
}
-function scicos_params() {
-
- var options = arguments[0] || new Object();
- var i = 0;
- var l = 0;
-
- this.type=new ScilabString(new data("params",i++,l),new data("wpar",i++,l),new data("title",i++,l),new data("tol",i++,l),new data("tf",i++,l),new data("context",i++,l),new data("void1",i++,l),new data("options",i++,l),new data("void2",i++,l),new data("void3",i++,l),new data("doc",i++,l));
- this.wpar = options.wpar || new ScilabDouble(new data(600,0,0),new data(450,1,0),new data(0,2,0),new data(0,3,0),new data(600,4,0),new data(450,5,0));
- this.titlex = options.title||options.Title||new ScilabString(new data("Untitled",0,0));
- this.tf = options.tf|| new ScilabDouble(new data(100000,0,0));
- this.tol = options.tol|| new ScilabDouble(new data(Math.pow(10, -6),0,0),new data(Math.pow(10, -6),0,1),new data(Math.pow(10, -10),0,2),new data(100001,0,3),new data(0,0,4),new data(1,0,5),new data(0,0,6));
- this.context = options.context|| new ScilabString(new data("",0,0));
- this.void1 = new ScilabDouble();
- this.options = options.options||new default_options();
- this.void2 = new ScilabDouble();
- this.void3 = new ScilabDouble();
- this.doc = options.doc || list();
-
-
- return tlist(this.type,this.wpar,this.titlex,this.tol,this.tf,this.context,this.void1,this.options,this.void2,this.void3,this.doc);
-
+function ScilabString() {
+ var i = 0,
+ j = 0;
+ if (arguments.length) {
+ var array = arguments;
+ this.height = array.length;
+ this.width = array[0].length;
+ for (i = 0; i < this.height; i++) {
+ for (j = 0; j < this.width; j++) {
+ this["data" + i + j] = new data();
+ this["data" + i + j].value = array[i][j];
+ this["data" + i + j].line = i;
+ this["data" + i + j].column = j;
+ }
+ }
+ }
}
-// This might also have to be overloaded
-function default_options() {
-
- var i=0;
- var l=0;
-
- this.type=new ScilabString(new data("scsopt",i++,l),new data("3D",i++,l),new data("Background",i++,l),new data("Link",i++,l),new data("ID",i++,l),new data("Cmap",i++,l));
- this.D3=list(new ScilabBoolean(new data("true",0,0)),new ScilabDouble(new data(33,0,0)));
- this.Background=new ScilabDouble(new data(8,0,0),new data(1,1,0));
- this.Link=new ScilabDouble(new data(1,0,0),new data(5,1,0));
- this.ID=list(new ScilabDouble(new data(4,0,0),new data(1,1,0),new data(10,2,0),new data(1,3,0)),new ScilabDouble(new data(4,0,0),new data(1,1,0),new data(2,2,0),new data(1,3,0)));
- this.Cmap=new ScilabDouble(new data(0.8,0,0),new data(0.8,1,0),new data(0.8,2,0));
-
- return tlist(this.type,this.D3,this.Background,this.Link,this.ID,this.Cmap);
+function ScilabBoolean() {
+ var i = 0,
+ j = 0;
+ if (arguments.length) {
+ var array = arguments;
+ this.height = array.length;
+ this.width = array[0].length;
+ for (i = 0; i < this.height; i++) {
+ for (j = 0; j < this.width; j++) {
+ this["data" + i + j] = new data();
+ this["data" + i + j].value = array[i][j].toString();
+ this["data" + i + j].line = i;
+ this["data" + i + j].column = j;
+ }
+ }
+ }
}
-//Returns ScilabDouble which contains a list with size =n and all values=0
-function zeros(n) {
- var arg=new Array(n + 1).join('0').split('').map(parseFloat);
- var port = new ScilabDouble();
- var i = 0;
-
- for (i = 0; i < arg[0].length; i++)
- port.list.push(new data(arg[0][i], i, 0));
- return port;
+function ScilabDouble() {
+ var i = 0,
+ j = 0;
+ if (arguments.length) {
+ var array = arguments;
+ this.height = array.length;
+ this.width = array[0].length;
+ for (i = 0; i < this.height; i++) {
+ for (j = 0; j < this.width; j++) {
+ this["data" + i + j] = new data();
+ this["data" + i + j].realPart = array[i][j];
+ this["data" + i + j].line = i;
+ this["data" + i + j].column = j;
+ }
+ }
+ }
}
-
-function scicos_link() {
- var options=arguments[0];
- var i=0;
- var l=0;
- this.type = new ScilabString(new data("Link", i++, l),new data("xx", i++, l),new data("yy", i++, l),new data("id", i++, l),new data("thick", i++, l),new data("ct", i++, l),new data("from", i++, l),new data("to", i++, l));
- this.xx = options.xx || new ScilabDouble(); //inverse array
- this.yy = options.yy || new ScilabDouble(); //inverse array
- this.id = options.id || new ScilabString();
- this.thick =options.thick || new ScilabDouble(new data(0,0,0),new data(0,1,0));
- this.ct = options.ct || new ScilabDouble(new data(1,0,0), new data(1,1,0));
- this.from = options.from || new ScilabDouble();
- this.to = options.xx || new ScilabDouble();
-
- return mlist(this.type,this.xx,this.yy,this.id,this.thick,this.ct,this.from,this.to);
+function data() {
+ this.line;
+ this.column;
+ this.realPart;
+ this.value;
}
-function CLKIN_f() {
- var model = scicos_model();
- var port=1;
-
- model[sim] = new ScilabString(new data('input', 0, 0));
- model[evtout] = new ScilabDouble(); // 1, 1 -> -1, -1
- model[ipar]=new ScilabDouble(new data(port,0,0));
- model[blocktype] = new ScilabString(new data('d', 0, 0));
- model[firing] = new ScilabDouble(new data(-1,0,0));
- model[dep_ut] = new ScilabBoolean(new data('false', 0, 0), new data('false', 1, 0));
-
- var exprs=ScilabString(new data(""+port,0,0));
- var gr_i = new ScilabString(new data("xstringb(orig(1),orig(2),\"CLKIN_f\",sz(1),sz(2));", 0, 0));
- var block = new standard_define(new ScilabDouble(new data(80, 0, 0), new data(80, 1, 0)), model,exprs,gr_i); // 1 -> 80
-
- block[graphics][style] = new ScilabString(new data("CLKIN_f", 0, 0));
- return block
+function CONST_m() {
+ var c = [1];
+ switch (arguments[0]) {
+
+ /*case "get":
+ var array = ["Constant_Value"];
+ return array;
+ case "set":
+ c = new Array(arguments[1].Constant_Value);
+ break;
+ */
+ case "define":
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["cstblk4"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble();
+ model.out = new ScilabDouble([c.length]);
+ model.in2 = new ScilabDouble();
+ model.out2 = new ScilabDouble([c.length]);
+ model.rpar = new ScilabDouble(c);
+ model.opar = list();
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CONST_m\",sz(1),sz(2));"]);
+ var exprs = sci2exp(c);
+ var block = new standard_define(new ScilabDouble([80, 80]), model, exprs, gr_i); // 1 -> 80
+ block.graphics.style = new ScilabString(["CONST_m"]);
+ var attributes = {
+ style: "CONST_m",
+ simulationFunctionName: "cstblk4",
+ simulationFunctionType: "C_OR_FORTRAN",
+ blockType: "d",
+ interfaceFunctionName: "CONST_m"
+ };
+ return new BasicBlock(attributes, new ScilabDouble(c), exprs);
+ }
}
-function CLKOUT_f() {
- var model = scicos_model();
- var port=1;
-
- model[sim] = new ScilabString(new data('output', 0, 0));
- model[evtin] = new ScilabDouble(new data(-1,0,0)); // 1, 1 -> -1, -1
- model[ipar]=new ScilabDouble(new data(port,0,0));
- model[blocktype] = new ScilabString(new data('d', 0, 0));
- model[firing] = new ScilabDouble();
- model[dep_ut] = new ScilabBoolean(new data('false', 0, 0), new data('false', 1, 0));
-
- var exprs=ScilabString(new data(""+port,0,0));
- var gr_i = new ScilabString(new data("xstringb(orig(1),orig(2),\"CLKOUT_f\",sz(1),sz(2));", 0, 0));
- var block = new standard_define(new ScilabDouble(new data(80, 0, 0), new data(80, 1, 0)), model,exprs,gr_i); // 1 -> 80
-
- block[graphics][style] = new ScilabString(new data("CLKOUT_f", 0, 0));
- return block
+function ANDLOG_f() {
+ var model = scicos_model();
+ model.sim = new ScilabString(["andlog"]);
+ model.out = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]); // null -> 1
+ model.evtin = new ScilabDouble([-1, -1]) // 1, 1 -> -1, -1
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ANDLOG_f\",sz(1),sz(2));"]);
+ var block = new standard_define(new ScilabDouble([80, 80]), model, new ScilabDouble(), gr_i); // 3 -> 80
+
+ // Style
+ block.graphics.out_implicit = new ScilabString(["E"]);
+ //block.graphics.out_style = "ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0";
+ block.graphics.style = new ScilabString(["ANDLOG_f"]);
+ return block;
}
+function ANDBLK() {
-function IFTHEL_f() {
- var model = scicos_model();
- model[sim] = list(new ScilabString(new data('ifthel', 0, 0)),new ScilabDouble(new data(-1,0,0)));
- model[in1]=new ScilabDouble(new data(1,0,0));
- model[in2]=new ScilabDouble(new data(1,0,0));
- model[intyp]=new ScilabDouble(new data(-1,0,0));
- model[evtin]=new ScilabDouble(new data(-1,0,0));
- model[evtout] = new ScilabDouble(new data(-1, 0, 0), new data(-1, 0, 1)) // 1, 1 -> -1, -1 inverse
- model[blocktype] = new ScilabString(new data('l', 0, 0));
- model[firing] = new ScilabDouble(new data(-1, 0, 0), new data(-1, 0, 1)); // inverse
- model[dep_ut] = new ScilabBoolean(new data('true', 0, 0), new data('false', 1, 0));
- model[nmode] = new ScilabDouble(new data(1,0,0));
- model[nzcross] = new ScilabDouble(new data(1,0,0));
-
- var gr_i = new ScilabString(new data("xstringb(orig(1),orig(2),\"IFTHEL_f\",sz(1),sz(2));", 0, 0));
- var exprs=new ScilabString(new data("1",0,0),new data("1",0,1)); //value model.in, model.nmode inverse
- var block = new standard_define(new ScilabDouble(new data(80, 0, 0), new data(80, 1, 0)), model, exprs, gr_i); // 3 -> 80
- block[graphics][style] = new ScilabString(new data("IFTHEL_f", 0, 0));
- return block;
+ var andlog = ANDLOG_f("define");
+ andlog.graphics.orig = new ScilabDouble([194, 133]);
+ andlog.graphics.sz = new ScilabDouble([60]);
+ andlog.graphics.flip = new ScilabBoolean([true]);
+ andlog.graphics.pout = new ScilabDouble([9]);
+ andlog.graphics.pein = new ScilabDouble([4], [11]);
+
+ var input_port1 = CLKIN_f("define");
+ input_port1.graphics.orig = new ScilabDouble([149, 287]);
+ input_port1.graphics.sz = new ScilabDouble([20, 20]);
+ input_port1.graphics.flip = new ScilabBoolean([true]);
+ input_port1.graphics.exprs = new ScilabString(["1"]);
+ input_port1.graphics.peout = new ScilabDouble([4]);
+ input_port1.graphics.ipar = new ScilabDouble([1]);
+
+ var output_port = CLKOUT_f("define");
+ output_port.graphics.orig = new ScilabDouble([450, 83]);
+ output_port.graphics.sz = new ScilabDouble([20, 20]);
+ output_port.graphics.flip = new ScilabBoolean([true]);
+ output_port.graphics.exprs = new ScilabString(["1"]);
+ output_port.graphics.pein = new ScilabDouble([8]);
+ output_port.graphics.ipar = new ScilabDouble([1]);
+
+ var input_port2 = CLKIN_f("define");
+ input_port2.graphics.orig = new ScilabDouble([141, 330]);
+ input_port2.graphics.sz = new ScilabDouble([20, 20]);
+ input_port2.graphics.flip = new ScilabBoolean([true]);
+ input_port2.graphics.exprs = new ScilabString(["2"]);
+ input_port2.graphics.peout = new ScilabDouble([6]);
+ input_port2.graphics.ipar = new ScilabDouble([2]);
+
+ var ifthel = IFTHEL_f("define");
+ ifthel.graphics.orig = new ScilabDouble([331, 137]);
+ ifthel.graphics.sz = new ScilabDouble([60, 60]);
+ ifthel.graphics.flip = new ScilabBoolean([true]);
+ ifthel.graphics.pin = new ScilabDouble([9]);
+ ifthel.graphics.pein = new ScilabDouble([12]);
+ ifthel.graphics.peout = new ScilabDouble([8], [0]);
+
+ var split = CLKSPLIT_f("define");
+ split.graphics.orig = new ScilabDouble([234, 275.78348]);
+ split.graphics.pein = new ScilabDouble([6]);
+ split.graphics.peout = new ScilabDouble([11, 12]);
+
+ var diagram = scicos_diagram();
+ diagram.objs.push(andlog);
+ diagram.objs.push(input_port1);
+ diagram.objs.push(output_port);
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([169, 214, 214]),
+ yy: new ScilabDouble([297, 297, 198.71]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([2, 1]),
+ to: new ScilabDouble([1, 1])
+ }));
+ diagram.objs.push(input_port2);
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([161, 234, 234]),
+ yy: new ScilabDouble([340, 340, 275.78]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([5, 1]),
+ to: new ScilabDouble([10, 1])
+ }));
+ diagram.objs.push(ifthel);
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([351, 351, 450]),
+ yy: new ScilabDouble([131.29, 93, 93]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([7, 1]),
+ to: new ScilabDouble([3, 1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([262.57, 322.43]),
+ yy: new ScilabDouble([163, 167]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 1]),
+ to: new ScilabDouble([7, 1])
+ }));
+ diagram.objs.push(split);
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([234, 234]),
+ yy: new ScilabDouble([275.78, 198.71]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([10, 1]),
+ to: new ScilabDouble([1, 2])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([234, 361, 361]),
+ yy: new ScilabDouble([275.78, 275.78, 202.71]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([10, 2]),
+ to: new ScilabDouble([7, 1])
+ }));
+ var x = scicos_block();
+ x.gui = new ScilabString(["ANDBLK"]);
+ x.graphics.sz = new ScilabDouble([2, 2]);
+ x.graphics.gr_i = new ScilabDouble();
+ x.graphics.pein = new ScilabDouble([0, 0]);
+ x.graphics.peout = new ScilabDouble([0]);
+ x.model.sim = new ScilabString(["csuper"]);
+ x.model.evtin = new ScilabDouble([1, 1]);
+ x.model.evtout = new ScilabDouble([1]);
+ x.model.blocktype = new ScilabString(["h"]);
+ x.model.firing = new ScilabBoolean([false]);
+ x.model.dep_ut = new ScilabBoolean([false, false]);
+ x.model.rpar = diagram;
+ var attributes = {
+ style: "ANDBLK",
+ simulationFunctionName: "csuper",
+ simulationFunctionType: "DEFAULT",
+ blockType: "h",
+ interfaceFunctionName: "ANDBLK"
+ };
+ return new BasicBlock(attributes, x.model.rpar, x.graphics.exprs);
}
+function CLKIN_f() {
+ var model = scicos_model();
+ var port = 1;
+
+ model.sim = new ScilabString(["input"]);
+ model.evtout = new ScilabDouble(); // 1, 1 -> -1, -1
+ model.ipar = new ScilabDouble([port]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = ScilabString(["" + port]);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLKIN_f\",sz(1),sz(2));"]);
+ var block = new standard_define(new ScilabDouble([80, 80]), model, exprs, gr_i); // 1 -> 80
+
+ block.graphics.style = new ScilabString(["CLKIN_f"]);
+ return block;
+}
+function CLKOUT_f() {
+ var model = scicos_model();
+ var port = 1;
+
+ model.sim = new ScilabString(["output"]);
+ model.evtin = new ScilabDouble([-1]); // 1, 1 -> -1, -1
+ model.ipar = new ScilabDouble([port]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = ScilabString(["" + port]);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLKOUT_f\",sz(1),sz(2));"]);
+ var block = new standard_define(new ScilabDouble([80, 80]), model, exprs, gr_i); // 1 -> 80
+
+ block.graphics.style = new ScilabString(["CLKOUT_f"]);
+ return block;
+}
function CLKSPLIT_f() {
- var model = scicos_model();
- model[sim] = new ScilabString(new data('split', 0, 0));
- model[evtin]=new ScilabDouble(new data(-1,0,0));
- model[evtout] = new ScilabDouble(new data(-1, 0, 0), new data(-1, 0, 1)) // 1, 1 -> -1, -1 inverse
- model[blocktype] = new ScilabString(new data('d', 0, 0));
- model[firing] = new ScilabDouble(new data(-1, 0, 0), new data(-1, 0, 1)); // inverse
- model[dep_ut] = new ScilabBoolean(new data('true', 0, 0), new data('false', 1, 0));
-
- var gr_i = new ScilabString(new data("xstringb(orig(1),orig(2),\"CLKSPLIT_f\",sz(1),sz(2));", 0, 0));
-
- var block = new standard_define(new ScilabDouble(new data(80, 0, 0), new data(80, 1, 0)), model, new ScilabDouble(), gr_i); // 1 -> 80
- block[graphics][style] = new ScilabString(new data("CLKSPLIT_f", 0, 0));
- return block;
+ var model = scicos_model();
+ model.sim = new ScilabString(["split"]);
+ model.evtin = new ScilabDouble([-1]);
+ model.evtout = new ScilabDouble([-1], [-1]) // 1, 1 -> -1, -1 inverse
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1], [-1]); // inverse
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLKSPLIT_f\",sz(1),sz(2));"]);
+
+ var block = new standard_define(new ScilabDouble([80, 80]), model, new ScilabDouble(), gr_i); // 1 -> 80
+ block.graphics.style = new ScilabString(["CLKSPLIT_f"]);
+ return block;
}
-function ANDLOG_f() {
- var model = scicos_model();
- model[sim] = new ScilabString(new data('andlog', 0, 0));
- model[out] = new ScilabDouble(new data(1, 0, 0));
- model[out2] = new ScilabDouble(new data(1, 0, 0)); // null -> 1
- model[evtin] = new ScilabDouble(new data(-1, 0, 0), new data(-1, 1, 0)) // 1, 1 -> -1, -1
- model[blocktype] = new ScilabString(new data('d', 0, 0));
- model[firing] = new ScilabDouble();
- model[dep_ut] = new ScilabBoolean(new data('false', 0, 0), new data('false', 1, 0));
-
- var gr_i = new ScilabString(new data("xstringb(orig(1),orig(2),\"ANDLOG_f\",sz(1),sz(2));", 0, 0));
- var block = new standard_define(new ScilabDouble(new data(80, 0, 0), new data(80, 1, 0)), model, new ScilabDouble(), gr_i); // 3 -> 80
-
- // Style
- block[graphics][out_implicit] = new ScilabString(new data("E",0,0));
- //block.graphics.out_style = "ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0";
- block[graphics][style] = new ScilabString(new data("ANDLOG_f", 0, 0));
- return block;
-}
-
-function BasicBlock()
-{
- switch(arguments[0])
- {
- case "ANDBLK":
- var attributes = {
- style: "ANDBLK",
- simulationFunctionName: "csuper",
- simulationFunctionType: "DEFAULT",
- blockType: "h",
- interfaceFunctionName: "ANDBLK"
- };
- break;
- case "CONST_m":
- var attributes = {
- style: "CONST_m",
- simulationFunctionName: "cstblk4",
- simulationFunctionType: "C_OR_FORTRAN",
- blockType: "d",
- interfaceFunctionName: "CONST_m"
- };
- break;
- }
- var options = attributes || new Object();
-
- this.angle=options.angle||"";
- this.blockType=options.blockType||"";
- this.connectable=options.connectable||"";
- this.dependsOnT=options.dependsOnT||"";
- this.dependsOnU=options.dependsOnU||"";
- this.id=options.id||"";
- this.interfaceFunctionName=options.interfaceFunctionName||"";
- this.ordering=options.ordering||"";
- this.parent=options.parent||"";
- this.simulationFunctionName=options.simulationFunctionName||"";
- this.simulationFunctionType=options.simulationFunctionType||"";
- this.style=options.style||"";
- this.value=options.value||"";
- this.vertex=options.vertex||"";
- this.visible=options.visible||"";
-
- switch(arguments[0])
- {
- case "ANDBLK":
- this.realParameters=ANDBLK();
- break;
- case "CONST_m":
- this.realParameters=CONST_m("define");
- break;
- }
+function IFTHEL_f() {
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["ifthel"]), new ScilabDouble([-1]));
+ model.in = new ScilabDouble([1]);
+ model.in2 = new ScilabDouble([1]);
+ model.intyp = new ScilabDouble([-1]);
+ model.evtin = new ScilabDouble([-1]);
+ model.evtout = new ScilabDouble([-1], [-1]) // 1, 1 -> -1, -1 inverse
+ model.blocktype = new ScilabString(["l"]);
+ model.firing = new ScilabDouble([-1], [-1]); // inverse
+ model.dep_ut = new ScilabBoolean([true, false]);
+ model.nmode = new ScilabDouble([1]);
+ model.nzcross = new ScilabDouble([1]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"IFTHEL_f\",sz(1),sz(2));"]);
+ var exprs = new ScilabString(["1"], ["1"]); //value model.in, model.nmode inverse
+ var block = new standard_define(new ScilabDouble([80, 80]), model, exprs, gr_i); // 3 -> 80
+ block.graphics.style = new ScilabString(["IFTHEL_f"]);
+ return block;
}
-function ANDBLK() {
-
- var andlog=ANDLOG_f("define");
- andlog[graphics][orig]=new ScilabDouble(new data(194,0,0),new data(133,1,0));
- andlog[graphics][sz]=new ScilabDouble(new data(60,0,0),new data(60,1,0));
- andlog[graphics][flip]=new ScilabBoolean(new data("true",0,0));
- andlog[graphics][pout]=new ScilabDouble(new data(9,0,0));
- andlog[graphics][pein]=new ScilabDouble(new data(4,0,0),new data(11,0,1));
-
- var input_port1=CLKIN_f("define");
- input_port1[graphics][orig]=new ScilabDouble(new data(149,0,0),new data(287,1,0));
- input_port1[graphics][sz]=new ScilabDouble(new data(20,0,0),new data(20,1,0));
- input_port1[graphics][flip]=new ScilabBoolean(new data("true",0,0));
- input_port1[graphics][exprs]=new ScilabString(new data("1",0,0));
- input_port1[graphics][peout]=new ScilabDouble(new data(4,0,0));
- input_port1[graphics][ipar]=new ScilabDouble(new data(1,0,0));
-
- var output_port=CLKOUT_f("define");
- output_port[graphics][orig]=new ScilabDouble(new data(450,0,0),new data(83,1,0));
- output_port[graphics][sz]=new ScilabDouble(new data(20,0,0),new data(20,1,0));
- output_port[graphics][flip]=new ScilabBoolean(new data("true",0,0));
- output_port[graphics][exprs]=new ScilabString(new data("1",0,0));
- output_port[graphics][pein]=new ScilabDouble(new data(8,0,0));
- output_port[graphics][ipar]=new ScilabDouble(new data(1,0,0));
-
- var input_port2=CLKIN_f("define");
- input_port2[graphics][orig]=new ScilabDouble(new data(141,0,0),new data(330,1,0));
- input_port2[graphics][sz]=new ScilabDouble(new data(20,0,0),new data(20,1,0));
- input_port2[graphics][flip]=new ScilabBoolean(new data("true",0,0));
- input_port2[graphics][exprs]=new ScilabString(new data("2",0,0));
- input_port2[graphics][peout]=new ScilabDouble(new data(6,0,0));
- input_port2[graphics][ipar]=new ScilabDouble(new data(2,0,0));
-
- var ifthel=IFTHEL_f("define");
- ifthel[graphics][orig]=new ScilabDouble(new data(331,0,0),new data(137,1,0));
- ifthel[graphics][sz]=new ScilabDouble(new data(60,0,0),new data(60,1,0));
- ifthel[graphics][flip]=new ScilabBoolean(new data("true",0,0));
- ifthel[graphics][pin]=new ScilabDouble(new data(9,0,0));
- ifthel[graphics][pein]=new ScilabDouble(new data(12,0,0));
- ifthel[graphics][peout]=new ScilabDouble(new data(8,0,0),new data(0,0,1));
-
- var split=CLKSPLIT_f("define");
- split[graphics][orig]=new ScilabDouble(new data(234,0,0),new data(275.78348,1,0));
- split[graphics][pein]=new ScilabDouble(new data(6,0,0));
- split[graphics][peout]=new ScilabDouble(new data(11,0,0),new data(12,1,0));
-
- var diagram=scicos_diagram();
- diagram[objs].push(andlog);
- diagram[objs].push(input_port1);
- diagram[objs].push(output_port);
- var scicos_link1={xx : new ScilabDouble(new data(169,0,0),new data(214,1,0),new data(214,2,0)),
- yy : new ScilabDouble(new data(297,0,0),new data(297,1,0),new data(198.71,2,0)),
- ct : new ScilabDouble(new data(5,0,0),new data(-1,1,0)),
- from : new ScilabDouble(new data(2,0,0),new data(1,1,0)),
- to : new ScilabDouble(new data(1,0,0),new data(1,1,0))
- };
- diagram[objs].push(scicos_link(scicos_link1));
- diagram[objs].push(input_port2);
- var scicos_link2={xx : new ScilabDouble(new data(161,0,0),new data(234,1,0),new data(234,2,0)),
- yy : new ScilabDouble(new data(340,0,0),new data(340,1,0),new data(275.78,2,0)),
- ct : new ScilabDouble(new data(5,0,0),new data(-1,1,0)),
- from : new ScilabDouble(new data(5,0,0),new data(1,1,0)),
- to : new ScilabDouble(new data(10,0,0),new data(1,1,0))
- };
- diagram[objs].push(scicos_link(scicos_link2));
- diagram[objs].push(ifthel);
- var scicos_link3={xx : new ScilabDouble(new data(351,0,0),new data(351,1,0),new data(450,2,0)),
- yy : new ScilabDouble(new data(131.29,0,0),new data(93,1,0),new data(93,2,0)),
- ct : new ScilabDouble(new data(5,0,0),new data(-1,1,0)),
- from : new ScilabDouble(new data(7,0,0),new data(1,1,0)),
- to : new ScilabDouble(new data(3,0,0),new data(1,1,0))
- };
- diagram[objs].push(scicos_link(scicos_link3));
- var scicos_link4={xx : new ScilabDouble(new data(262.57,0,0),new data(322.43,1,0)),
- yy : new ScilabDouble(new data(163,0,0),new data(167,1,0)),
- ct : new ScilabDouble(new data(1,0,0),new data(1,1,0)),
- from : new ScilabDouble(new data(1,0,0),new data(1,1,0)),
- to : new ScilabDouble(new data(7,0,0),new data(1,1,0))
- };
- diagram[objs].push(scicos_link(scicos_link4));
- diagram[objs].push(split);
- var scicos_link5={xx : new ScilabDouble(new data(234,0,0),new data(234,1,0)),
- yy : new ScilabDouble(new data(275.78,0,0),new data(198.71,1,0)),
- ct : new ScilabDouble(new data(5,0,0),new data(-1,1,0)),
- from : new ScilabDouble(new data(10,0,0),new data(1,1,0)),
- to : new ScilabDouble(new data(1,0,0),new data(2,1,0))
- };
- diagram[objs].push(scicos_link(scicos_link5));
- var scicos_link6={xx : new ScilabDouble(new data(234,0,0),new data(361,1,0),new data(361,2,0)),
- yy : new ScilabDouble(new data(275.78,0,0),new data(275.78,1,0),new data(202.71,2,0)),
- ct : new ScilabDouble(new data(5,0,0),new data(-1,1,0)),
- from : new ScilabDouble(new data(10,0,0),new data(2,1,0)),
- to : new ScilabDouble(new data(7,0,0),new data(1,1,0))
- };
- diagram[objs].push(scicos_link(scicos_link6));
-
-
- var x=scicos_block();
- x[gui]=new ScilabString(new data("ANDBLK",0,0));
- x[graphics][sz]= new ScilabDouble(new data(2,0,0),new data(2,1,0));
- x[graphics][gr_i]=new ScilabDouble();
- x[graphics][pein]=new ScilabDouble(new data(0,0,0),new data(0,1,0));
- x[graphics][peout]=new ScilabDouble(new data(0,0,0));
- x[model][sim]= new ScilabString(new data("csuper",0,0));
- x[model][evtin]=new ScilabDouble(new data(1,0,0), new data(1,1,0));
- x[model][evtout]=new ScilabDouble(new data(1,0,0));
- x[model][blocktype]= new ScilabString(new data("h",0,0));
- x[model][firing]= new ScilabBoolean(new data("false",0,0));
- x[model][dep_ut]= new ScilabBoolean(new data("false",0,0),new data("false",1,0));
- x[model][rpar]=diagram;
- return x;
-}
-function sci2exp(c)
-{
- if(c.length==1)
- return new ScilabString(new data(c.toString(),0,0));
- else
- return new ScilabString(new data("["+c.toString()+"]",0,0));
+function BasicBlock() {
+ var options = arguments[0] || new Object();
+ this.angle = options.angle || "";
+ this.blockType = options.blockType || "";
+ this.connectable = options.connectable || "";
+ this.dependsOnT = options.dependsOnT || "";
+ this.dependsOnU = options.dependsOnU || "";
+ this.id = options.id || "";
+ this.interfaceFunctionName = options.interfaceFunctionName || "";
+ this.ordering = options.ordering || "";
+ this.parent = options.parent || "";
+ this.simulationFunctionName = options.simulationFunctionName || "";
+ this.simulationFunctionType = options.simulationFunctionType || "";
+ this.style = options.style || "";
+ this.value = options.value || "";
+ this.vertex = options.vertex || "";
+ this.visible = options.visible || "";
+ this.exprs = arguments[2] || "";
+ this.realParameters = arguments[1] || "";
+ this.integerParameters = new ScilabDouble();
+ this.objectParameters = list();
+ this.nbZerosCrossing = new ScilabDouble([0]);
+ this.nmode = new ScilabDouble([0]);
+ this.oDState = list();
+ this.equations = list();
}
-function C()
-{
- var i=0;
- var arr=[]
- for(i=0;i<arguments[0].length;i++)
- {
- arr.push(new data(arguments[0][i],i,0));
- }
- return new ScilabDouble(...arr);
-}
-function CONST_m()
-{
- var c=[1];
- switch(arguments[0])
- {
-
- case "get":
- var array=["Constant_Value"];
- return array;
- case "set":
- c=new Array(arguments[1].Constant_Value);
- console.log(c);
- break;
- case "define":
- console.log(c);
- var model = scicos_model();
- model[sim] = list(new ScilabString(new data('cstblk4', 0, 0)),new ScilabDouble(new data(4,0,0)));
- model[in1]=new ScilabDouble();
- model[out]=new ScilabDouble(new data(c.length,0,0));
- model[in2]=new ScilabDouble();
- model[out2]=new ScilabDouble(new data(c.length,0,0));
- model[rpar]=C(c);
- model[opar]=list();
- model[blocktype] = new ScilabString(new data('d', 0, 0));
- model[dep_ut] = new ScilabBoolean(new data('false', 0, 0), new data('false', 1, 0));
-
- var gr_i = new ScilabString(new data("xstringb(orig(1),orig(2),\"CONST_m\",sz(1),sz(2));", 0, 0));
- var exprs=sci2exp(c);
- var block = new standard_define(new ScilabDouble(new data(80, 0, 0), new data(80, 1, 0)), model, exprs, gr_i); // 1 -> 80
- block[graphics][style] = new ScilabString(new data("CONST_m", 0, 0));
- return block;
- }
+function sci2exp(c) {
+ if (c.length == 1)
+ return new ScilabString([c.toString()]);
+ else
+ return new ScilabString("[" + c.toString() + "]");
} \ No newline at end of file
diff --git a/index.html b/index.html
index 4ba3077..62b2f88 100644
--- a/index.html
+++ b/index.html
@@ -166,12 +166,12 @@
if (!this.isHtmlLabel(cell)) {
this.startEditingAtCell(cell);
} else {
- /*
+ /*
var content = document.createElement('div');
content.innerHTML = this.convertValueToString(cell);
- showModalWindow(this, 'Properties', content, 400, 300);*/
-
- showPropertiesWindow(graph);
+ showModalWindow(this, 'Properties', content, 400, 300);
+ */
+ showPropertiesWindow(graph, cell);
}
}
@@ -205,13 +205,13 @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// https://jgraph.github.io/mxgraph/docs/js-api/files/model/mxCell-js.html
// Uncomment this block to see XML tags work
- graph.convertValueToString = function(cell)
+ /*graph.convertValueToString = function(cell)
{
if (mxUtils.isNode(cell.value))
{
return cell.getAttribute('label', '');
}
- };
+ };*/
var cellLabelChanged = graph.cellLabelChanged;
graph.cellLabelChanged = function(cell, newValue, autoSize) {
@@ -255,10 +255,63 @@
button.appendChild(titleName);
});
+ // @jiteshjha, @pooja
+ /*
+ On selection and deletion of any block, 'deleteBlock'
+ function deletes all the associated edges with that block.
+ Used Preorder traversal for edges.
+ */
+ editor.addAction('deleteBlock', function(editor, cell) {
+ var cells = [];
+ var selectionCells = graph.getSelectionCells();
+ for (var k = 0; k < selectionCells.length; k++) {
+ var portCount = selectionCells[k].getChildCount();
+ cells.push(selectionCells[k]);
+ // Finds all the port with edges of the selected cell, and calls getEdgeId() for
+ // each edge object of that port.
+ for (var i = 0; i < portCount; i++) {
+ var edgeCount = selectionCells[k].getChildAt(i).getEdgeCount();
+ if (edgeCount != 0) {
+ getEdgeId(selectionCells[k].getChildAt(i));
+
+ for (var j = 0; j < edgeCount; j++) {
+ var edgeObject = selectionCells[k].getChildAt(i).getEdgeAt(j);
+ getEdgeId(edgeObject);
+ }
+ }
+ }
+ }
+
+
+ /* getEdgeId() find all the associated edges from an edge.
+ Pushes the object of that edge into an array of mxCell objects.
+ */
+ function getEdgeId(edgeObject) {
+ var cellStack = [];
+ if (edgeObject != null && edgeObject.isEdge() == true) {
+ cellStack.push(edgeObject);
+ while (cellStack.length != 0) {
+ var tempEdgeObject = cellStack.pop();
+ if (tempEdgeObject.edge == true && (cells.indexOf(tempEdgeObject) == -1)) {
+ cells.push(tempEdgeObject);
+ }
+ for (var j = 0; j < tempEdgeObject.getEdgeCount(); j++) {
+ cellStack.push(tempEdgeObject.getEdgeAt(j));
+ }
+ }
+ }
+ }
+
+ // The mxCells to be deleted are first highlighted,
+ // and then the selection is deleted in a single go.
+ graph.getSelectionModel().setCells(cells);
+ editor.execute('delete');
+ });
+
addToolbarButton(editor, toolbar, 'toggle', 'Expand All', 'images/navigate_plus.png');
toolbar.appendChild(spacer.cloneNode(true));
- addToolbarButton(editor, toolbar, 'delete', 'Delete', 'images/delete2.png');
+ addToolbarButton(editor, toolbar, 'deleteBlock', 'Delete', 'images/delete2.png');
toolbar.appendChild(spacer.cloneNode(true));
addToolbarButton(editor, toolbar, 'cut', 'Cut', 'images/cut.png');
@@ -321,7 +374,6 @@
// Handles cursor keys - guides.html
var nudge = function(keyCode) {
- graph.container.focus();
if (!graph.isSelectionEmpty()) {
var dx = 0;
var dy = 0;
@@ -338,7 +390,7 @@
}
};
// Transfer initial focus to graph container for keystroke handling
- //graph.container.focus();
+ // graph.container.focus();
// Handles keystroke events
var keyHandler = new mxKeyHandler(graph);
keyHandler.bindKey(37, function() {
@@ -383,109 +435,128 @@
connectionHandlerMouseUp.apply(this, arguments);
};
-
mxEvent.disableContextMenu(container);
+
+ // @Adhitya: Add focus to a mxCell
+ if (mxClient.IS_NS) {
+ mxEvent.addListener(graph.container, 'mousedown', function(evt) {
+ if (!graph.isEditing()) {
+ graph.container.setAttribute('tabindex', '-1');
+ graph.container.focus();
+ }
+ });
+ }
+
}
};
- function showPropertiesWindow(graph) {
-
- /*var array = ["Number of curves",
- "color (>0) or mark (<0)",
- "line or mark size",
- "Output window number (-1 for automatic)",
- "Output window position",
- "Output window sizes",
- "Xmin and Xmax",
- "Ymin and Ymax",
- "Zmin and Zmax",
- "Alpha and Theta",
- "Buffer size"
- ];*/
- var array=CONST_m("get");
- //console.log(array);
-
- // Create basic structure for the form.
+ function showPropertiesWindow(graph, cell) {
+
+ var defaultProperties = {
+ nbr_curves: ["Number of curves", 1],
+ clrs: ["color (>0) or mark (<0)", [1, 2, 3, 4, 5, 6, 7, 13]],
+ siz: ["line or mark size", [1, 1, 1, 1, 1, 1, 1, 1]],
+ win: ["Output window number (-1 for automatic)", -1],
+ wpos: ["Output window position", [-1, -1]],
+ wdim: ["Output window sizes", [-1, -1]],
+ vec_x: ["Xmin and Xmax", [-15, 15]],
+ vec_y: ["Ymin and Ymax", [-15, 15]],
+ vec_z: ["Zmin and Zmax", [-15, 15]],
+ param3ds: ["Alpha and Theta", [50, 280]],
+ N: ["Buffer size", 2]
+ };
+
+ // Create basic structure for the form
var content = document.createElement('div');
//content.id = "contentProperties";
content.setAttribute("id", "contentProperties");
- // Heading of content.
+ // Heading of content
var heading = document.createElement('h2');
heading.innerHTML = "Set Scope Parameters";
heading.id = "headingProperties"
content.appendChild(heading);
- // Add Form.
+ // Add Form
var myform = document.createElement("form");
myform.method = "post";
myform.id = "formProperties";
- // Line break.
+ // Line break
var linebreak = document.createElement('br');
myform.appendChild(linebreak);
- for (field in array) {
- // Input Title.
- var fieldName = array[field];
- var namelabel = document.createElement('label');
- namelabel.innerHTML = fieldName;
- myform.appendChild(namelabel);
-
-
- // Input.
- var input = document.createElement("input");
- input.name = fieldName;
- input.style.cssText = 'float: right;';
- input.id = fieldName;
- myform.appendChild(input);
-
- // Line break.
- var linebreak = document.createElement('br');
- myform.appendChild(linebreak);
-
- // Line break.
- var linebreak = document.createElement('br');
- myform.appendChild(linebreak);
-
+ for (var key in defaultProperties) {
+ if (defaultProperties.hasOwnProperty(key)) {
+
+ // Input Title
+ var fieldName = defaultProperties[key];
+ var namelabel = document.createElement('label');
+ namelabel.innerHTML = defaultProperties[key][0];
+ myform.appendChild(namelabel);
+
+ // Input
+ var input = document.createElement("input");
+ input.name = key;
+ input.value = defaultProperties[key][1];
+ input.setAttribute("id", key.toString());
+ input.setAttribute("class", "fieldInput");
+ myform.appendChild(input);
+
+ // Line break
+ var linebreak = document.createElement('br');
+ myform.appendChild(linebreak);
+
+ // Line break
+ var linebreak = document.createElement('br');
+ myform.appendChild(linebreak);
+ }
}
- // Line break.
+
+ // Line break
var linebreak = document.createElement('br');
myform.appendChild(linebreak);
- // Button - Submit.
+ // Button - Submit
var btn = document.createElement("button");
btn.innerHTML = 'Submit';
btn.type = "button";
btn.name = "submit";
- // Executes when button 'btn' is clicked.
+ // Executes when button 'btn' is clicked
btn.onclick = function() {
- var params = {};
- var i=0;
- for(i=0;i<array.length;i++)
- params[array[i]] = document.getElementById(array[i]).value;
- console.log(params);
- CONST_m("set",params);
+ var propertiesObject = {
+ id: cell.id
+ };
+
+ for (var key in defaultProperties) {
+ if (defaultProperties.hasOwnProperty(key)) {
+ propertiesObject[key] = document.getElementById(key.toString()).value;
+ }
+ }
};
myform.appendChild(btn);
- // Button - Reset.
+ // Button - Reset
var btn = document.createElement("button");
btn.innerHTML = 'Reset';
btn.type = "button";
btn.name = "submit";
- btn.id = "resetButtonProperties"
- //btn.style.cssText='float:right;';
+ btn.id = "resetButtonProperties";
btn.onclick = function() {
- // Only removes the content div, not the modal window.
+ // Reset
+ for (var key in defaultProperties) {
+ if (defaultProperties.hasOwnProperty(key)) {
+ var element = document.getElementById(key.toString());
+ element.value = defaultProperties[key][1];
+ }
+ }
};
-
myform.appendChild(btn);
// Base height without fields : 135 px
- height = 135 + 26 * array.length + 15;
+ height = 135 + 26 * defaultProperties.length + 15;
content.appendChild(myform);
showModalWindow(graph, 'Properties', content, 450, height);
@@ -577,14 +648,13 @@
wnd.addListener(mxEvent.DESTROY, function(evt) {
graph.setEnabled(true);
mxEffects.fadeOut(background, 50, true, 10, 30, true);
- //alert("jitesh");
});
graph.setEnabled(false);
graph.tooltipHandler.hide();
wnd.setVisible(true);
};
-
+
function addSidebarIcon(graph, sidebar, name, image) {
// Function that is executed when the image is dropped on
@@ -599,34 +669,22 @@
try {
var label = getImgHTML(name); // Will not exist for all blocks
- if(name == 'ANDBLK'){
-
- var details = new BasicBlock(name);
- var encoder = new mxCodec();
- var result = encoder.encode(details);
- result.setAttribute('label',label);
- //var xml = mxUtils.getPrettyXml(result);
- //var blockName = document.createTextNode(xml);
- //alert(blockName);
- //details.appendChild(blockName);
- //alert(details);
- //console.log(details);*/
- var temp=encoder.encode(parent);
- result.setAttribute('parent',temp.getAttribute('id')); //@ASP1234 to get id in Basic Block
- v1 = graph.insertVertex(parent, null,result, x, y, 80, 80, 'ANDBLK');
- createPorts(graph, v1, [], ['CONTROL','CONTROL'], [], ['COMMAND']);
-
+ if (name == 'ANDBLK') {
+ var details = ANDBLK("define");
+ var enc = new mxCodec(mxUtils.createXmlDocument());
+ var node = enc.encode(details);
+ //node.setAttribute('label',label);
+ v1 = graph.insertVertex(parent, null, node, x, y, 80, 80, 'ANDBLK');
+ createPorts(graph, v1, [], ['CONTROL', 'CONTROL'], [], ['COMMAND']);
} else if (name == 'CMSCOPE') {
v1 = graph.insertVertex(parent, null, label, x, y, 80, 80, 'CMSCOPE');
createPorts(graph, v1, ['EXPLICIT', 'EXPLICIT'], ['CONTROL'], [], []);
} else if (name == 'CONST_m') {
- var details = new BasicBlock(name); // This isn't even the right function!
- var encoder = new mxCodec();
- var result = encoder.encode(details);
- result.setAttribute('label',"1");
-
- v1 = graph.insertVertex(parent, null,result, x, y, 80, 80,'CONST_m');
- createPorts(graph, v1, [], [], ['EXPLICIT'], []);
+ var details = CONST_m("define");
+ var enc = new mxCodec(mxUtils.createXmlDocument());
+ var node = enc.encode(details);
+ v1 = graph.insertVertex(parent, null, node, x, y, 80, 80, 'CONST_m');
+ createPorts(graph, v1, [], [], ['EXPLICIT'], []);
} else if (name == 'CONVERT') {
v1 = graph.insertVertex(parent, null, 'Convert to', x, y, 80, 80, 'CONVERT');
createPorts(graph, v1, ['EXPLICIT'], [], ['EXPLICIT'], []);
@@ -1055,8 +1113,8 @@
};
</script>
<!--
- Updates connection points before the routing is called.
--->
+ Updates connection points before the routing is called.
+ -->
<script type="text/javascript">
// Computes the position of edge to edge connection points.
mxGraphView.prototype.updateFixedTerminalPoint = function(edge, terminal, source, constraint) {
@@ -1122,8 +1180,8 @@
</script>
<!--
- Overrides methods to preview and create new edges.
--->
+ Overrides methods to preview and create new edges.
+ -->
<script type="text/javascript">
// Sets source terminal point for edge-to-edge connections.
mxConnectionHandler.prototype.createEdgeState = function(me) {
@@ -1229,8 +1287,8 @@
};
</script>
<!--
- Adds in-place highlighting for complete cell area (no hotspot).
--->
+ Adds in-place highlighting for complete cell area (no hotspot).
+ -->
<script type="text/javascript">
mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
mxConnectionHandler.prototype.createMarker = function() {
@@ -1255,8 +1313,8 @@
}
</script>
<!--
- Imlements a custom resistor shape. Direction currently ignored here.
--->
+ Implements a custom resistor shape. Direction currently ignored here.
+ -->
<script type="text/javascript">
mxEdgeStyle.WireConnector = function(state, source, target, hints, result) {
// Creates array of all way- and terminalpoints
@@ -1367,7 +1425,7 @@
<div id="toolbarContainer" style="position:absolute;white-space:nowrap;overflow:hidden;top:0px;left:0px;max-height:24px;height:36px;right:0px;padding:6px;background-image:url('images/toolbar_bg.gif');">
</div>
- <!-- Creates a container for the toolboox -->
+ <!-- Creates a container for the toolbox -->
<div id="sidebarContainer" class="ui-accordion ui-widget ui-helper-reset" style="position:absolute;overflow:scroll;top:36px;left:0px;bottom:36px;max-width:266px;width:270px;padding-top:10px;padding-left:4px;">
</div>
@@ -1472,4 +1530,4 @@
});
</script>
-</html>
+</html> \ No newline at end of file