refactor(nodes): use content-box for resize observer
This commit is contained in:
@@ -52,9 +52,13 @@ const dragging = useDrag({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const observer = useResizeObserver(nodeElement, () => {
|
const observer = useResizeObserver(
|
||||||
updateNodeDimensions([{ id, nodeElement: nodeElement.value, forceUpdate: true }])
|
nodeElement,
|
||||||
})
|
() => {
|
||||||
|
updateNodeDimensions([{ id, nodeElement: nodeElement.value, forceUpdate: true }])
|
||||||
|
},
|
||||||
|
{ box: 'content-box' },
|
||||||
|
)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[() => node.width, () => node.height, () => node.type, () => node.sourcePosition, () => node.targetPosition],
|
[() => node.width, () => node.height, () => node.type, () => node.sourcePosition, () => node.targetPosition],
|
||||||
|
|||||||
Reference in New Issue
Block a user