refactor(nodes-selection): cleanup
This commit is contained in:
@@ -43,7 +43,7 @@ function NodesSelection({
|
|||||||
}: NodesSelectionProps) {
|
}: NodesSelectionProps) {
|
||||||
const store = useStoreApi();
|
const store = useStoreApi();
|
||||||
const { transform, userSelectionActive } = useStore(selector, shallow);
|
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);
|
const nodeRef = useRef(null);
|
||||||
|
|
||||||
// it's important that these handlers are memoized to avoid multiple creation of d3 drag handler
|
// it's important that these handlers are memoized to avoid multiple creation of d3 drag handler
|
||||||
@@ -83,8 +83,8 @@ function NodesSelection({
|
|||||||
style={{
|
style={{
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
top: y,
|
top,
|
||||||
left: x,
|
left,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user