fix: move slots outside of zoom pane
* avoids zoom gesture events bubbling to zoom pane and causing elements over flow to trigger zoom when they shouldn't Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -51,10 +51,17 @@ onMounted(() => {
|
||||
|
||||
useKeyPress(props.selectionKeyCode, (keyPressed) => (selectionKeyPresed.value = keyPressed))
|
||||
})
|
||||
const userSelection = computed(() => selectionKeyPresed.value && (store.selectionActive || store.elementsSelectable))
|
||||
const nodesSelectionActive = computed(() => store.nodesSelectionActive)
|
||||
</script>
|
||||
<script lang="ts">
|
||||
export default {
|
||||
inheritAttrs: false,
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<slot></slot>
|
||||
<UserSelection v-if="selectionKeyPresed && (store.selectionActive || store.elementsSelectable)" id="user-selection" />
|
||||
<NodesSelection v-if="store.nodesSelectionActive" id="nodes-selection" />
|
||||
<div class="vue-flow__pane" @click.self="onClick" @contextmenu="onContextMenu" @wheel="onWheel" />
|
||||
<UserSelection v-if="userSelection" id="user-selection" />
|
||||
<NodesSelection v-if="nodesSelectionActive" id="nodes-selection" />
|
||||
<div class="vue-flow__pane" @click="onClick" @contextmenu="onContextMenu" @wheel="onWheel" />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user