refactor(core): use shallowRef where possible (#1847)
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import type { D3DragEvent, DragBehavior, SubjectPosition } from 'd3-drag'
|
||||
import { drag } from 'd3-drag'
|
||||
import { select } from 'd3-selection'
|
||||
import type { MaybeRefOrGetter, Ref } from 'vue'
|
||||
import { ref, toValue, watch } from 'vue'
|
||||
import { shallowRef, toValue, watch } from 'vue'
|
||||
import type { MouseTouchEvent, NodeDragEvent, NodeDragItem, XYPosition } from '../types'
|
||||
import {
|
||||
calcAutoPan,
|
||||
@@ -62,7 +62,7 @@ export function useDrag(params: UseDragParams) {
|
||||
|
||||
const { onStart, onDrag, onStop, onClick, el, disabled, id, selectable, dragHandle } = params
|
||||
|
||||
const dragging = ref(false)
|
||||
const dragging = shallowRef(false)
|
||||
|
||||
let dragItems: NodeDragItem[] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user