Skip to content

Commit

Permalink
fix(core): only display grab cursor when panOnDrag is on left mouse b…
Browse files Browse the repository at this point in the history
…utton (#1586)

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

Signed-off-by: braks <[email protected]>

* chore(changeset): add

Signed-off-by: braks <[email protected]>

---------

Signed-off-by: braks <[email protected]>
  • Loading branch information
bcakmakoglu committed Aug 19, 2024
1 parent ebc604d commit e90f4cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/famous-games-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-flow/core": patch
---

Only display grab cursor when panOnDrag is on left mouse button
6 changes: 5 additions & 1 deletion packages/core/src/container/Viewport/Viewport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand Down

0 comments on commit e90f4cc

Please sign in to comment.