From 3cf32ccb7b9d519a190bb8db512b34756a149a2f Mon Sep 17 00:00:00 2001 From: moklick Date: Sun, 22 May 2022 14:12:32 +0200 Subject: [PATCH] refactor(nodes-selection): cleanup --- src/components/NodesSelection/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/NodesSelection/index.tsx b/src/components/NodesSelection/index.tsx index 93867758..b3da5045 100644 --- a/src/components/NodesSelection/index.tsx +++ b/src/components/NodesSelection/index.tsx @@ -43,7 +43,7 @@ function NodesSelection({ }: NodesSelectionProps) { const store = useStoreApi(); const { transform, userSelectionActive } = useStore(selector, shallow); - const { width, height, x, y } = useStore(bboxSelector, shallow); + const { width, height, x: left, y: top } = useStore(bboxSelector, shallow); const nodeRef = useRef(null); // it's important that these handlers are memoized to avoid multiple creation of d3 drag handler @@ -83,8 +83,8 @@ function NodesSelection({ style={{ width, height, - top: y, - left: x, + top, + left, }} />