fix(nodes): Recalculate handle bounds on position change
This commit is contained in:
@@ -4,7 +4,7 @@ import { CSSProperties, isVNode } from 'vue'
|
|||||||
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'
|
||||||
import { getXYZPos } from '../../utils'
|
import { getHandleBounds, getXYZPos } from '../../utils'
|
||||||
|
|
||||||
interface NodeWrapperProps {
|
interface NodeWrapperProps {
|
||||||
id: string
|
id: string
|
||||||
@@ -74,6 +74,8 @@ watch(
|
|||||||
} else {
|
} else {
|
||||||
node.value.computedPosition = xyzPos
|
node.value.computedPosition = xyzPos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
node.value.handleBounds = getHandleBounds(nodeElement.value, scale.value)
|
||||||
},
|
},
|
||||||
{ deep: true },
|
{ deep: true },
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user