'detach method in jsplumb removes from connection array but does not update in UI
I when i click on connection there are some properties, in those properties we have delete connection button, which use delegate undelgate method with click event.
It deletes connection from connections array but does not update it in UI. I tried using repaint and remove method but didn't worked
$(document).undelegate("#btn-delete", "click").delegate("#btn-delete", "click", function() {
for (var i in ObjectMap) {
if (ObjectMap[i].type == "con") {
if (ObjectMap[i].source == current_obj.source && ObjectMap[i].target == current_obj.target) {
jsPlumb.detach(ObjectMap[i].connection, {
fireEvent: false,
forceDetach: false
});
delete ObjectMap[i];
}
}
}
});
JSPlumb version - 1.5.3
Solution 1:[1]
It's difficult to diagnose without some code snippets or, better, a reproduction. The method on an instance of jsPlumb to remove a connection is deleteConnection(connection)
. Are you using that? If you think this is a bug you could open an issue in Github.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | jsPlumb Team |