Commit f13ccfdf authored by Sebastien Robin's avatar Sebastien Robin

gui prototype: remove items in successorList when element is removed

parent 6cbae9f9
......@@ -67,11 +67,14 @@
});
var updateConnectionData = function(connection, remove) {
console.log("updateConnectionData is being called");
var source_element;
source_element = priv.element_container[connection.sourceId];
source_element.successorList = source_element.successorList || [];
source_element.successorList.push(connection.targetId);
if (remove) {
source_element.successorList.splice(source_element.successorList.indexOf(connection.targetId));
} else {
source_element.successorList.push(connection.targetId);
}
priv.onDataChange();
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment