refactor(core): stop reset of user selection on mouse leave
This commit is contained in:
Vendored
+2
-2
@@ -52,8 +52,8 @@ declare global {
|
|||||||
const customRef: typeof import('vue')['customRef']
|
const customRef: typeof import('vue')['customRef']
|
||||||
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
||||||
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
|
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
|
||||||
const defaultEdgeTypes: typeof import('./store/state')['defaultEdgeTypes']
|
const defaultEdgeTypes: typeof import('./store/index')['defaultEdgeTypes']
|
||||||
const defaultNodeTypes: typeof import('./store/state')['defaultNodeTypes']
|
const defaultNodeTypes: typeof import('./store/index')['defaultNodeTypes']
|
||||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||||
const defineComponent: typeof import('vue')['defineComponent']
|
const defineComponent: typeof import('vue')['defineComponent']
|
||||||
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
|
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
|
||||||
|
|||||||
@@ -81,12 +81,6 @@ const onMouseUp = () => {
|
|||||||
userSelectionActive.value = false
|
userSelectionActive.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const onMouseLeave = () => {
|
|
||||||
nodesSelectionActive.value = prevNodes > 0
|
|
||||||
|
|
||||||
reset()
|
|
||||||
}
|
|
||||||
|
|
||||||
onBeforeUnmount(reset)
|
onBeforeUnmount(reset)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -103,7 +97,6 @@ export default {
|
|||||||
@mousemove="onMouseMove"
|
@mousemove="onMouseMove"
|
||||||
@click="onMouseUp"
|
@click="onMouseUp"
|
||||||
@mouseup="onMouseUp"
|
@mouseup="onMouseUp"
|
||||||
@mouseleave="onMouseLeave"
|
|
||||||
>
|
>
|
||||||
<SelectionRect v-if="rect.draw" :width="rect.width" :height="rect.height" :x="rect.x" :y="rect.y" />
|
<SelectionRect v-if="rect.draw" :width="rect.width" :height="rect.height" :x="rect.x" :y="rect.y" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user