fix(core): only display grab cursor when panOnDrag is on left mouse button (#1586)

* fix(core): only display grab cursor when panOnDrag is on left mouse button

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2024-08-19 17:29:57 +02:00
parent ebc604d980
commit e90f4cca57
2 changed files with 10 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@vue-flow/core": patch
---
Only display grab cursor when panOnDrag is on left mouse button

View File

@@ -408,7 +408,11 @@ export default {
<Pane
:is-selecting="isSelecting"
:selection-key-pressed="selectionKeyPressed"
:class="{ connecting: !!connectionStartHandle, dragging: paneDragging, draggable: shouldPanOnDrag }"
:class="{
connecting: !!connectionStartHandle,
dragging: paneDragging,
draggable: panOnDrag === true || (Array.isArray(panOnDrag) && panOnDrag.includes(0)),
}"
>
<Transform>
<slot />