fix: disable inherting attrs on nodes/edges to avoid warnings

* disable context warnings for non-dev environments

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-16 16:01:44 +01:00
parent 63f710e422
commit a58d952e9f
12 changed files with 45 additions and 12 deletions
@@ -30,6 +30,8 @@ const onMouseLeave = () => {
store.unsetNodesSelection()
}
const userSelectionRect = computed(() => store.userSelectionRect)
useEventListener(el, 'mousedown', onMouseDown)
useEventListener(el, 'mousemove', onMouseMove)
useEventListener(el, 'click', onMouseUp)
@@ -39,11 +41,11 @@ useEventListener(el, 'mouseleave', onMouseLeave)
<template>
<div ref="user-selection" class="vue-flow__selectionpane">
<SelectionRect
v-if="store.userSelectionRect.draw"
:width="store.userSelectionRect.width"
:height="store.userSelectionRect.height"
:x="store.userSelectionRect.x"
:y="store.userSelectionRect.y"
v-if="userSelectionRect.draw"
:width="userSelectionRect.width"
:height="userSelectionRect.height"
:x="userSelectionRect.x"
:y="userSelectionRect.y"
/>
</div>
</template>
+1 -1
View File
@@ -1,4 +1,4 @@
import { XYPosition } from '../../types'
import { XYPosition } from '~/types'
export function getMousePosition(event: MouseEvent): XYPosition | void {
const flowNode = (event.target as Element).closest('.vue-flow')