Is there a way to customize the button used to drag draggable
shapes/stage?
#1478
Unanswered
leonardoraele
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to replicate the behavior of apps like Miro, where I can drag individual objects with one mouse button but can also drag the entire canvas with another mouse button.
I was able to replicate this behavior by re-implementing the drag and drop using only mouse events, (i.e. detecting
mousedown
andmouseup
, checkingmouseEvent.evt.button
to identify the button being used, and updating the shape position onmousemove
, if the right button button is used for the event target) but now I'm wondering if it could have been done with Konva'sdraggable
property.Can I customize Konva's default behavior so that a
draggable
shape or stage is only draggable when the correct button is used?Beta Was this translation helpful? Give feedback.
All reactions