fix: replace watchDebounced with debouncedWatch
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useDraggableCore } from '@braks/revue-draggable'
|
import { useDraggableCore } from '@braks/revue-draggable'
|
||||||
import { watchDebounced } from '@vueuse/core'
|
|
||||||
import { useVueFlow } from '../../composables'
|
import { useVueFlow } from '../../composables'
|
||||||
import { GraphNode, NodeComponent, SnapGrid } from '../../types'
|
import { GraphNode, NodeComponent, SnapGrid } from '../../types'
|
||||||
import { NodeId, Slots } from '../../context'
|
import { NodeId, Slots } from '../../context'
|
||||||
@@ -126,7 +125,7 @@ const { scale, onDrag, onDragStart, onDragStop } = useDraggableCore(nodeElement,
|
|||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
watchDebounced(
|
debouncedWatch(
|
||||||
() => store.transform[2],
|
() => store.transform[2],
|
||||||
() => {
|
() => {
|
||||||
scale.value = store.transform[2]
|
scale.value = store.transform[2]
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useDraggableCore } from '@braks/revue-draggable'
|
import { useDraggableCore } from '@braks/revue-draggable'
|
||||||
import { watchDebounced } from '@vueuse/core'
|
|
||||||
import { useVueFlow } from '../../composables'
|
import { useVueFlow } from '../../composables'
|
||||||
import { getRectOfNodes } from '../../utils'
|
import { getRectOfNodes } from '../../utils'
|
||||||
|
|
||||||
@@ -30,7 +29,7 @@ const { onDragStart, onDrag, onDragStop, scale } = useDraggableCore(el, {
|
|||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
watchDebounced(
|
debouncedWatch(
|
||||||
() => store.transform[2],
|
() => store.transform[2],
|
||||||
() => {
|
() => {
|
||||||
scale.value = store.transform[2]
|
scale.value = store.transform[2]
|
||||||
|
|||||||
Reference in New Issue
Block a user