detach method in jsplumb removes from connection array but does not update in UI

49 Views Asked by At

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

1

There are 1 best solutions below

1
jsPlumb Team On

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.