{"action":"opened","issue":{"url":"https://api.github.com/repos/jsplumb/jsPlumb/issues/645","repository_url":"https://api.github.com/repos/jsplumb/jsPlumb","labels_url":"https://api.github.com/repos/jsplumb/jsPlumb/issues/645/labels{/name}","comments_url":"https://api.github.com/repos/jsplumb/jsPlumb/issues/645/comments","events_url":"https://api.github.com/repos/jsplumb/jsPlumb/issues/645/events","html_url":"https://github.com/jsplumb/jsPlumb/issues/645","id":234876280,"number":645,"title":"connectionDetached called before jsPlumb object is updated ","user":{"login":"DedicatedManager","id":314076,"avatar_url":"https://avatars2.githubusercontent.com/u/314076?v=3","gravatar_id":"","url":"https://api.github.com/users/DedicatedManager","html_url":"https://github.com/DedicatedManager","followers_url":"https://api.github.com/users/DedicatedManager/followers","following_url":"https://api.github.com/users/DedicatedManager/following{/other_user}","gists_url":"https://api.github.com/users/DedicatedManager/gists{/gist_id}","starred_url":"https://api.github.com/users/DedicatedManager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DedicatedManager/subscriptions","organizations_url":"https://api.github.com/users/DedicatedManager/orgs","repos_url":"https://api.github.com/users/DedicatedManager/repos","events_url":"https://api.github.com/users/DedicatedManager/events{/privacy}","received_events_url":"https://api.github.com/users/DedicatedManager/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-09T16:20:05Z","updated_at":"2017-06-09T16:20:05Z","closed_at":null,"body":"When a connection is detached, I need to loop over the jsPlumb object to rebuild my app's understanding of how all the objects are connected to each other.\r\n\r\nIt appears as though connectionDetached is called before the jsPlumb object itself is updated with the change.  \r\n\r\nFor example say I have the connections below:\r\nA->B->C->D\r\n\r\nIf I remove the connection from C->D, during the connectionDetached event, the jsPlumb object still thinks C is connected to D.\r\n\r\nI'm currently solving my issue by setting a setTimeOut event in the connectionDetached for a delay of about 200ms to call my function which loops over the jsPlumb object which gives the jsPlumb code time to finish up after the connectionDetached event.  Obviously this is not great coding on my part as its not guaranteed the jsPlumb object will be finished updating in that amount of time.\r\n\r\nIs what is happening desired operation for jsPlumb or is it a bug?\r\n\r\nIs there an event that can be bound to on the jsPlumb object that can be called whenever a change has been made to the jsPlumb object itself, such that I could call my loop function by that event?\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n  "}}
{"actor":{"display_login":"DedicatedManager"}}