refactor(nodes): re-init when source- or targetPosition changes
This commit is contained in:
@@ -165,7 +165,7 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
|
|||||||
if (nodeElement.current && !isHidden) {
|
if (nodeElement.current && !isHidden) {
|
||||||
updateNodeDimensions({ id, nodeElement: nodeElement.current });
|
updateNodeDimensions({ id, nodeElement: nodeElement.current });
|
||||||
}
|
}
|
||||||
}, [id, isHidden]);
|
}, [id, isHidden, sourcePosition, targetPosition]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (nodeElement.current) {
|
if (nodeElement.current) {
|
||||||
|
|||||||
Reference in New Issue
Block a user