fix(subflows): use abs positions for internal calculations (#2189)
* refactor(dragging): only use absolute positions * refactor(drag): handle node extent * refactor(drag-handler): return latest data * refactor(use-drag): cleanup fixes #2181
This commit is contained in:
@@ -141,7 +141,7 @@ const initialEdges: Edge[] = [
|
||||
];
|
||||
|
||||
const connectionLineStyle: CSSProperties = { stroke: '#ddd' };
|
||||
const snapGrid: SnapGrid = [16, 16];
|
||||
const snapGrid: SnapGrid = [25, 25];
|
||||
|
||||
const nodeStrokeColor = (n: Node): string => {
|
||||
if (n.style?.background) return n.style.background as string;
|
||||
@@ -203,7 +203,7 @@ const OverviewFlow = () => {
|
||||
>
|
||||
<MiniMap nodeStrokeColor={nodeStrokeColor} nodeColor={nodeColor} nodeBorderRadius={2} />
|
||||
<Controls />
|
||||
<Background color="#aaa" gap={20} />
|
||||
<Background color="#aaa" gap={25} />
|
||||
</ReactFlow>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user