refactor(nodes): remove flush timing from drag

This commit is contained in:
braks
2022-10-07 22:55:38 +02:00
committed by Braks
parent bf7594fdbb
commit 091c3dff31
+3 -6
View File
@@ -21,6 +21,7 @@ interface UseDragParams {
function useDrag(params: UseDragParams) {
const scope = effectScope()
const dragging = scope.run(() => {
const {
viewport,
@@ -62,9 +63,7 @@ function useDrag(params: UseDragParams) {
)
}
watch(
[() => disabled, () => el],
() => {
watch([() => disabled, () => el], () => {
if (el) {
const selection = select(el)
const node = id ? getNode(id) : undefined
@@ -155,9 +154,7 @@ function useDrag(params: UseDragParams) {
selection.call(dragHandler)
}
}
},
{ flush: 'post' },
)
})
return dragging
})