Merge branch 'main' into v11
This commit is contained in:
@@ -8,11 +8,10 @@ import { ReactFlowState } from '../types';
|
||||
function useVisibleNodes(onlyRenderVisible: boolean) {
|
||||
const nodes = useStore(
|
||||
useCallback(
|
||||
(s: ReactFlowState) => {
|
||||
return onlyRenderVisible
|
||||
(s: ReactFlowState) =>
|
||||
onlyRenderVisible
|
||||
? getNodesInside(s.nodeInternals, { x: 0, y: 0, width: s.width, height: s.height }, s.transform, true)
|
||||
: Array.from(s.nodeInternals.values());
|
||||
},
|
||||
: Array.from(s.nodeInternals.values()),
|
||||
[onlyRenderVisible]
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user