mirror of
https://github.com/OFFIS-ESC/constellation-analyzer
synced 2026-01-27 07:43:41 +00:00
Implements proper edge rendering when both source and target actors are in minimized groups. Edges are now correctly rerouted to connect the minimized group nodes with dynamic floating edge calculations. Key changes: - Add edge rerouting logic to redirect edges from hidden actors to their parent minimized groups - Implement edge deduplication to prevent multiple edges between same groups when multiple actors have connections - Fix floating edge calculations with fallback dimensions to prevent NaN - Use canonical parentId property instead of actorIds array for accuracy - Create constants.ts for MINIMIZED_GROUP_WIDTH/HEIGHT (220x80) - Replace magic numbers throughout codebase with named constants - Remove sourceHandle/targetHandle properties when routing to groups to avoid React Flow validation errors Technical details: - GraphEditor: Build actor-to-group mapping using parentId, deduplicate edges with Map keyed by source_target, strip handle properties - CustomEdge: Use floating edge params for minimized groups on both ends - edgeUtils: Add fallback dimensions and division-by-zero guards in getNodeIntersection and getEdgePosition - graphStore: Use constants for minimized group dimensions Edges between minimized groups now render with proper Bezier curves and dynamic connection points that adapt to group positions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
15 lines
297 B
TypeScript
15 lines
297 B
TypeScript
/**
|
|
* Application-wide constants
|
|
*/
|
|
|
|
/**
|
|
* Minimized group dimensions
|
|
*/
|
|
export const MINIMIZED_GROUP_WIDTH = 220;
|
|
export const MINIMIZED_GROUP_HEIGHT = 80;
|
|
|
|
/**
|
|
* Default actor/node dimensions (approximate)
|
|
*/
|
|
export const DEFAULT_ACTOR_WIDTH = 150;
|
|
export const DEFAULT_ACTOR_HEIGHT = 80;
|