fix(core): allow control key as pan activation key code (#1707)
* fix(core): allow control key as pan activation key code Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(changeset): add Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * fix(core): allow drag regardless of btn chosen Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * fix(core): prevent browser ctx menu on pane right click Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): cleanup useKeyPress handler Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * fix(core): check `panOnDrag` prop for allowed drag buttons Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(changeset): add Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): cleanup 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:
@@ -17,7 +17,6 @@ const {
|
||||
emits,
|
||||
userSelectionActive,
|
||||
removeSelectedElements,
|
||||
panOnDrag,
|
||||
userSelectionRect,
|
||||
elementsSelectable,
|
||||
nodesSelectionActive,
|
||||
@@ -101,10 +100,8 @@ function onClick(event: MouseEvent) {
|
||||
}
|
||||
|
||||
function onContextMenu(event: MouseEvent) {
|
||||
if (Array.isArray(panOnDrag.value) && panOnDrag.value?.includes(2)) {
|
||||
event.preventDefault()
|
||||
return
|
||||
}
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
emits.paneContextMenu(event)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user