@@ -95,14 +95,16 @@ var Elm = function() {
95 this.value = s2.value;
95 this.value = s2.value;
96 this.kids = [];
96 this.kids = [];
97 this.count = 0;
97 this.count = 0;
98+ this.changed = false;
99 this.recv = function(timestep, changed, parentID) {
100 this.recv = function(timestep, changed, parentID) {
100− var chng = changed && parentID === s1.id;
101+ if (parentID === s1.id) this.changed = changed;
101− if (chng) { this.value = s2.value; }
102 this.count += 1;
102 this.count += 1;
103 if (this.count == 2) {
103 if (this.count == 2) {
104+ if (this.changed) { this.value = s2.value; }
104− send(this, timestep, chng);
105+ send(this, timestep, this.changed);
105 this.count = 0;
106 this.count = 0;
107+ this.changed = false;
108 s1.kids.push(this);
110 s1.kids.push(this);