summaryrefslogtreecommitdiff
path: root/js/Branching/SELF_SWITCH.js
diff options
context:
space:
mode:
authorSunil Shetye2018-07-11 13:05:13 +0530
committerSunil Shetye2018-07-11 15:21:08 +0530
commit079d0b4a3ec15a4d7d2644484d116df9d1c694bb (patch)
tree785ed59b5b238203a9e91f3e323da59d1083d86e /js/Branching/SELF_SWITCH.js
parent0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff)
downloadsci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip
fix assignment to list
Diffstat (limited to 'js/Branching/SELF_SWITCH.js')
-rw-r--r--js/Branching/SELF_SWITCH.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/Branching/SELF_SWITCH.js b/js/Branching/SELF_SWITCH.js
index 93975975..eca2147d 100644
--- a/js/Branching/SELF_SWITCH.js
+++ b/js/Branching/SELF_SWITCH.js
@@ -13,7 +13,7 @@ function SELF_SWITCH() {
this.x.model.out = 1;
this.x.model.blocktype = "h";
this.x.model.dep_ut = [false,false];
- this.x.model.rpar = this.genSwitchInnerDiagram[this.stateOpen-1];
+ this.x.model.rpar = genSwitchInnerDiagram(this.stateOpen);
this.x.model.opar = list(this.stateOpen);
this.x.graphics.in_implicit = ["E"];
this.x.graphics.in_style = "";
@@ -33,10 +33,10 @@ function SELF_SWITCH() {
SELF_SWITCH.prototype.set = function SELF_SWITCH() {
this.x = arg1;
this.stateOpen = this.x.model.opar[1-1];
- this.x.model.rpar = this.genSwitchInnerDiagram[!this.stateOpen-1];
+ this.x.model.rpar = genSwitchInnerDiagram(!this.stateOpen);
this.x.model.opar = list(!this.stateOpen);
- y = 0;
- typ = list();
+ var y = 0;
+ var typ = list();
if (this.stateOpen==false) {
this.x.graphics.style = "SELF_SWITCH_OFF";
} else {