refactor(store): use getNodes function

This commit is contained in:
moklick
2022-12-08 18:13:35 +01:00
parent 7c51a61f10
commit c51ae89eeb
18 changed files with 61 additions and 58 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ const nodesEqualityFn = (a: Node[], b: Node[]) => {
const storeSelector = (state: ReactFlowState) => ({
transform: state.transform,
nodeOrigin: state.nodeOrigin,
selectedNodesCount: Array.from(state.nodeInternals.values()).filter((node) => node.selected).length,
selectedNodesCount: state.getNodes().filter((node) => node.selected).length,
});
function getTransform(nodeRect: Rect, transform: Transform, position: Position, offset: number): string {