sporritt/jsPlumb — pull request #199 by xeijix (2014-04-16 04:39:16+00:00)
Title: updateOffsets() might encounter a stale reference

Since updateOffsets() iterates through a list of hash objects that contain id and offset, it's potentially trying to retrieve an endPoint html object that's been deleted. I've updated updateOffsets to check if that's the case, and if so, remove the reference in _delements and _draggablesForElements.

A little background: I encountered this issue when I called on unmakeTarget()/unmakeSource() on an element as well as removing it from the DOM which caused adjacent endPoints to be shifted so I had to call on updateOffsets().