feat: add minimap overview to process diagram
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m0s
CI / docker (push) Successful in 57s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 37s

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:
hsiegeln
2026-03-27 17:16:05 +01:00
parent b1ff05439a
commit 30c8fe1091
4 changed files with 195 additions and 0 deletions

View File

@@ -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}