Replies: 1 comment 1 reply
-
Well, what happens is, if you release the connection on top of another element, it's not a pane click - if you release it somewhere on the pane, it will register a click because a click happened. To filter out if the pane click originated from a connection attempt, you could store a flag during |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Made a codesandbox to demo this that just adds an onPaneClick handler that logs the events
demo.mp4
Sorry the video resolution is low but the issue is that I need to distinguish a user clicking the pane/graph vs. when the user is dragging an edge. Currently if the user drags an edge, when finishing dragging, it fires an onPaneClick event which triggers my event handler. But I don't want my onPaneClick event handler to run when a user is dragging an edge, I only want it to run when the user clicks the empty part of the graph/pane
Also oddly the onPaneClick fires inconsistently when dragging an edge which is demoed in the video included in this post.
Is there a way to distinguish the onPaneClick events that are from clicking the empty graph/pane vs finishing dragging an edge? And why is the onPaneClick event inconsistently firing when finishing dragging an edge?
Beta Was this translation helpful? Give feedback.
All reactions