feat: add minimap overview to process diagram
Small overview panel in the bottom-left showing the full diagram layout with colored node rectangles and an amber viewport indicator. Click or drag on the minimap to pan the main diagram. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import { DiagramEdge } from './DiagramEdge';
|
||||
import { CompoundNode } from './CompoundNode';
|
||||
import { ErrorSection } from './ErrorSection';
|
||||
import { ZoomControls } from './ZoomControls';
|
||||
import { Minimap } from './Minimap';
|
||||
import { isCompoundType } from './node-colors';
|
||||
import styles from './ProcessDiagram.module.css';
|
||||
|
||||
@@ -292,6 +293,18 @@ export function ProcessDiagram({
|
||||
);
|
||||
})()}
|
||||
|
||||
<Minimap
|
||||
sections={sections}
|
||||
totalWidth={totalWidth}
|
||||
totalHeight={totalHeight}
|
||||
scale={zoom.state.scale}
|
||||
translateX={zoom.state.translateX}
|
||||
translateY={zoom.state.translateY}
|
||||
containerWidth={zoom.containerRef.current?.clientWidth ?? 0}
|
||||
containerHeight={zoom.containerRef.current?.clientHeight ?? 0}
|
||||
onPan={zoom.panTo}
|
||||
/>
|
||||
|
||||
<ZoomControls
|
||||
onZoomIn={zoom.zoomIn}
|
||||
onZoomOut={zoom.zoomOut}
|
||||
|
||||
Reference in New Issue
Block a user