fix(subflows): handle selections correctly

This commit is contained in:
moklick
2021-11-26 19:35:31 +01:00
parent 330eefe695
commit 801d8f2ad4
10 changed files with 62 additions and 53 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import cc from 'classcat';
import shallow from 'zustand/shallow';
import { useStore } from '../../store';
import { getRectOfNodes } from '../../utils/graph';
import { getRectOfNodeInternals } from '../../utils/graph';
import { getBoundsofRects } from '../../utils';
import { Node, ReactFlowState, Rect } from '../../types';
import MiniMapNode from './MiniMapNode';
@@ -55,7 +55,7 @@ const MiniMap = ({
const hasNodes = nodeInternals && nodeInternals.size > 0;
// @TODO: work with nodeInternals instead of converting it to an array
const nodes = Array.from(nodeInternals).map(([_, node]) => node);
const bb = getRectOfNodes(nodes);
const bb = getRectOfNodeInternals(nodes);
const viewBB: Rect = {
x: -tX / tScale,
y: -tY / tScale,