refactor(utils): cleanup getPositionWithOrigin

This commit is contained in:
moklick
2024-04-18 09:17:51 +02:00
parent 356737d5be
commit 6c30686127
4 changed files with 30 additions and 44 deletions
@@ -86,7 +86,7 @@ function NodeComponentWrapperInner<NodeType extends Node>({
}) {
const { node, x, y } = useStore((s) => {
const node = s.nodeLookup.get(id) as InternalNode<NodeType>;
const { x, y } = getNodePositionWithOrigin(node, node?.origin || nodeOrigin).positionAbsolute;
const { x, y } = getNodePositionWithOrigin(node, nodeOrigin).positionAbsolute;
return {
node,