Stopping events propagating into parent #1341
-
Hello, I'm trying to create a "toolbar" where I would have nodes that I can drag and drop into the canvas but I'm having a problem making the VueFlow component not react to dragging when I drag over the sidebar. I've tried using the .stop() modifier on the mousedown and dragstart events, but the canvas still moves around even when I click on the overlaying side panel. Is there a different type of event I need to stop in order to get the canvas to not move around when I click on the sidebar? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can add the |
Beta Was this translation helpful? Give feedback.
You can add the
nopan
class name to the sidebar.Though I am wondering why you would want to add a sidebar into the zoom+pan area?
Instead you could use the
<Panel>
component to add something like the controls in the bottom right of your screenshot.Or you could use a sidebar that's outside of VueFlow altogether.