Can I disable a certain action without using the setInteractive action of useVueFlow? #693
Answered
by
bcakmakoglu
starter-dev
asked this question in
Q&A
-
For example, I want to disable the dragging of nodes without locking all the other actions. Is it possible? Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
bcakmakoglu
Feb 17, 2023
Replies: 1 comment 1 reply
-
Sure, you can use the the const setInteractive: Actions['setInteractive'] = (isInteractive) => {
state.nodesDraggable = isInteractive
state.nodesConnectable = isInteractive
state.elementsSelectable = isInteractive
} You can set all of these options separately yourself, no need to use the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
starter-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure, you can use the
nodesDraggable
option to disable/enable dragging for all nodes at once.the
setInteractive
option really just does this:You can set all of these options separately yourself, no need to use the
setInteractive
action.