You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing an application where the sigma container has panels around. In this app, nodes are draggable, using a code very similar to the one in the mouse-manipulations example.
Since the v2.1.0, users can drag the node, even when the mouse leaves the container, thanks to the #1148 fix.
But now, when the mouse leaves the container, the nodes are no more under the mouse, because the x and y positions in the event depend on what's under the mouse, basically.
The solution is to stop using the getX and getY positions, and instead always use the better offset method.
The text was updated successfully, but these errors were encountered:
Details:
- Updates mouse-manipulations example so that it features a sigma
container in a draggable page (to make it easier to test d-n-d code as
well as zooming in a graph in a scrolled webpage)
- Removes getX and getY helpers
- Makes `dom` a required argument in the getPosition helper, and adapts
all calls to this helper everywhere in the codebase
- Replaces pageX and pageY with clientX and clientY in getPosition (to
fix it)
This commit fixes issues #1175 and #1169.
I am developing an application where the sigma container has panels around. In this app, nodes are draggable, using a code very similar to the one in the
mouse-manipulations
example.Since the v2.1.0, users can drag the node, even when the mouse leaves the container, thanks to the #1148 fix.
But now, when the mouse leaves the container, the nodes are no more under the mouse, because the x and y positions in the event depend on what's under the mouse, basically.
The solution is to stop using the
getX
andgetY
positions, and instead always use the better offset method.The text was updated successfully, but these errors were encountered: