Skip to content

Commit e90f4cc

Browse files
committed
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>
1 parent ebc604d commit e90f4cc

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/famous-games-behave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/core": patch
3+
---
4+
5+
Only display grab cursor when panOnDrag is on left mouse button

packages/core/src/container/Viewport/Viewport.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,11 @@ export default {
408408
<Pane
409409
:is-selecting="isSelecting"
410410
:selection-key-pressed="selectionKeyPressed"
411-
:class="{ connecting: !!connectionStartHandle, dragging: paneDragging, draggable: shouldPanOnDrag }"
411+
:class="{
412+
connecting: !!connectionStartHandle,
413+
dragging: paneDragging,
414+
draggable: panOnDrag === true || (Array.isArray(panOnDrag) && panOnDrag.includes(0)),
415+
}"
412416
>
413417
<Transform>
414418
<slot />

0 commit comments

Comments
 (0)