UNPKG

@rxflow/manhattan

Version:

Manhattan routing algorithm for ReactFlow - generates orthogonal paths with obstacle avoidance

24 lines (18 loc) 767 B
/** * ReactFlow Manhattan Router * * A Manhattan routing algorithm adapted for ReactFlow from AntV X6. * Generates orthogonal (right-angle) paths that intelligently avoid obstacles. * * @packageDocumentation */ // Main function export { getManHattanPath } from "./getManHattanPath"; // Types // Geometry classes (for advanced usage) export { Point, Rectangle, Line } from "./geometry"; // Utility functions (for advanced usage) export { getGrid, align, snapToGrid, getDirectionAngle, getDirectionChange, getRectPoints, getCost, getKey, reconstructRoute, normalizePoint, getNodeDimensions, getNodePosition } from "./utils"; // Export types for utility functions // SVG utilities (for advanced usage) export { pointsToPath, snapPathToGrid } from "./svg";