summaryrefslogtreecommitdiff
path: root/details.js
diff options
context:
space:
mode:
authorPooja Soundalgekar2016-06-14 15:34:40 +0530
committerPooja Soundalgekar2016-06-14 15:34:40 +0530
commit3d576faafc9acd20b06055081da0b52da2c1e943 (patch)
treecd6e702c06b10e3decc63c22098a4620893bdf36 /details.js
parentf3c1898f50a719ad07ff2e93035a7f5a59c73058 (diff)
downloadxcos-on-web-3d576faafc9acd20b06055081da0b52da2c1e943.tar.gz
xcos-on-web-3d576faafc9acd20b06055081da0b52da2c1e943.tar.bz2
xcos-on-web-3d576faafc9acd20b06055081da0b52da2c1e943.zip
Minor changes
Diffstat (limited to 'details.js')
-rw-r--r--details.js164
1 files changed, 86 insertions, 78 deletions
diff --git a/details.js b/details.js
index 149031a..b7c2781 100644
--- a/details.js
+++ b/details.js
@@ -289,13 +289,11 @@ function getData() {
var dataObject = arguments[0];
var key;
var dataArray = [];
- for( key in dataObject ) {
- if(key != "height" && key != "width")
- {
- if( typeof dataObject[key].value === "undefined" ) {
+ for (key in dataObject) {
+ if (key != "height" && key != "width") {
+ if (typeof dataObject[key].value === "undefined") {
dataArray.push(dataObject[key].realPart);
- }
- else {
+ } else {
dataArray.push(dataObject[key].value);
}
}
@@ -538,6 +536,8 @@ function CFSCOPE() {
this.x = new standard_define(new ScilabDouble([80, 80]), model, exprs, gr_i); // 2 -> 80
this.x.graphics.style = new ScilabString(["CFSCOPE"]);
return new BasicBlock(this.x);
+ case "details":
+ return this.x;
}
}
@@ -600,82 +600,89 @@ function CMSCOPE() {
this.x = new standard_define(new ScilabDouble([80, 80]), model, exprs, gr_i); // 2 -> 80
this.x.graphics.style = new ScilabString(["CMSCOPE"]);
return new BasicBlock(this.x);
+ case "details":
+ return this.x;
}
}
function CLOCK_c() {
- var evtdly = EVTDLY_c("define");
- evtdly.graphics.orig = new ScilabDouble([320, 232]);
- evtdly.graphics.sz = new ScilabDouble([40, 40]);
- evtdly.graphics.flip = new ScilabBoolean([true]);
- evtdly.graphics.exprs = new ScilabString(["0.1"], ["0.1"]);
- evtdly.graphics.pein = new ScilabDouble([6]);
- evtdly.graphics.peout = new ScilabDouble([3]);
- evtdly.model.rpar = new ScilabDouble([0.1], [0.1]);
- evtdly.model.firing = new ScilabDouble([0.1]);
-
- evtdly.model.uid = new ScilabString([count]); // changed
- evtdly.doc = list(new ScilabString([count++]));
- evtdly.model.evtin = new ScilabDouble([-1]);
- evtdly.model.evtout = new ScilabDouble([-1]);
- evtdly.graphics.peout = new ScilabDouble([4]);
-
- var output_port = CLKOUT_f("define");
- output_port.graphics.orig = new ScilabDouble([399, 162]);
- 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([5]);
- output_port.model.ipar = new ScilabDouble([1]);
-
- output_port.model.uid = new ScilabString([count]); // changed
- output_port.doc = list(new ScilabString([count++]));
-
- var split = CLKSPLIT_f("define");
- split.graphics.orig = new ScilabDouble([380.71066, 172]);
- split.graphics.pein = new ScilabDouble([3]);
- split.graphics.peout = new ScilabDouble([5], [6]);
- split.model.uid = new ScilabString([count]);
- split.doc = list(new ScilabString([count++]));
- split.graphics.pein = new ScilabDouble([4]); // changed
-
- var diagram = scicos_diagram();
- diagram.objs.push(output_port);
- diagram.objs.push(evtdly);
- diagram.objs.push(split);
- diagram.objs.push(scicos_link({
- xx: new ScilabDouble([340], [340], [380.71]),
- yy: new ScilabDouble([226.29], [172], [172]),
- ct: new ScilabDouble([5, -1]),
- from: new ScilabDouble([2, 1, 0]),
- to: new ScilabDouble([3, 1, 1])
- }));
- diagram.objs.push(scicos_link({
- xx: new ScilabDouble([380.71], [399]),
- yy: new ScilabDouble([172], [172]),
- ct: new ScilabDouble([5, -1]),
- from: new ScilabDouble([3, 1, 0]),
- to: new ScilabDouble([1, 1, 1])
- }));
- diagram.objs.push(scicos_link({
- xx: new ScilabDouble([380.71], [380.71], [340], [340]),
- yy: new ScilabDouble([172], [302], [302], [277.71]),
- ct: new ScilabDouble([5, -1]),
- from: new ScilabDouble([3, 2, 0]),
- to: new ScilabDouble([2, 1, 1])
- }));
- var x = scicos_block();
- this.x.gui = new ScilabString(["CLOCK_c"]);
- this.x.graphics.sz = new ScilabDouble([2, 2]);
- this.x.graphics.gr_i = new ScilabString([]);
- this.x.graphics.peout = new ScilabDouble([0]);
- this.x.model.sim = new ScilabString(["csuper"]);
- this.x.model.evtout = new ScilabDouble([1]);
- this.x.model.blocktype = new ScilabString(["h"]);
- this.x.model.firing = new ScilabBoolean([false]);
- this.x.model.dep_ut = new ScilabBoolean([false, false]);
- this.x.model.rpar = diagram;
- return new BasicBlock(this.x);
+ switch (arguments[0]) {
+ case "define":
+ var evtdly = EVTDLY_c("define");
+ evtdly.graphics.orig = new ScilabDouble([320, 232]);
+ evtdly.graphics.sz = new ScilabDouble([40, 40]);
+ evtdly.graphics.flip = new ScilabBoolean([true]);
+ evtdly.graphics.exprs = new ScilabString(["0.1"], ["0.1"]);
+ evtdly.graphics.pein = new ScilabDouble([6]);
+ evtdly.graphics.peout = new ScilabDouble([3]);
+ evtdly.model.rpar = new ScilabDouble([0.1], [0.1]);
+ evtdly.model.firing = new ScilabDouble([0.1]);
+
+ evtdly.model.uid = new ScilabString([count]); // changed
+ evtdly.doc = list(new ScilabString([count++]));
+ evtdly.model.evtin = new ScilabDouble([-1]);
+ evtdly.model.evtout = new ScilabDouble([-1]);
+ evtdly.graphics.peout = new ScilabDouble([4]);
+
+ var output_port = CLKOUT_f("define");
+ output_port.graphics.orig = new ScilabDouble([399, 162]);
+ 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([5]);
+ output_port.model.ipar = new ScilabDouble([1]);
+
+ output_port.model.uid = new ScilabString([count]); // changed
+ output_port.doc = list(new ScilabString([count++]));
+
+ var split = CLKSPLIT_f("define");
+ split.graphics.orig = new ScilabDouble([380.71066, 172]);
+ split.graphics.pein = new ScilabDouble([3]);
+ split.graphics.peout = new ScilabDouble([5], [6]);
+ split.model.uid = new ScilabString([count]);
+ split.doc = list(new ScilabString([count++]));
+ split.graphics.pein = new ScilabDouble([4]); // changed
+
+ var diagram = scicos_diagram();
+ diagram.objs.push(output_port);
+ diagram.objs.push(evtdly);
+ diagram.objs.push(split);
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([340], [340], [380.71]),
+ yy: new ScilabDouble([226.29], [172], [172]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([2, 1, 0]),
+ to: new ScilabDouble([3, 1, 1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([380.71], [399]),
+ yy: new ScilabDouble([172], [172]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([3, 1, 0]),
+ to: new ScilabDouble([1, 1, 1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([380.71], [380.71], [340], [340]),
+ yy: new ScilabDouble([172], [302], [302], [277.71]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([3, 2, 0]),
+ to: new ScilabDouble([2, 1, 1])
+ }));
+ this.x = scicos_block();
+ this.x.gui = new ScilabString(["CLOCK_c"]);
+ this.x.graphics.sz = new ScilabDouble([2, 2]);
+ this.x.graphics.gr_i = new ScilabString([]);
+ this.x.graphics.peout = new ScilabDouble([0]);
+ this.x.model.sim = new ScilabString(["csuper"]);
+ this.x.model.evtout = new ScilabDouble([1]);
+ this.x.model.blocktype = new ScilabString(["h"]);
+ this.x.model.firing = new ScilabBoolean([false]);
+ this.x.model.dep_ut = new ScilabBoolean([false, false]);
+ this.x.model.rpar = diagram;
+ return new BasicBlock(this.x);
+ case "details":
+ return this.x;
+ }
}
function EVTDLY_c() {
@@ -921,3 +928,4 @@ function zeros(n) {
return port;
}
+