UNPKG

@rxflow/manhattan

Version:

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

41 lines 1.01 kB
import { Point } from './Point'; /** * Rectangle class representing a bounding box */ export declare class Rectangle { x: number; y: number; width: number; height: number; constructor(x: number, y: number, width: number, height: number); /** * Create a copy of this rectangle */ clone(): Rectangle; /** * Get the center point of the rectangle */ getCenter(): Point; /** * Get the origin (top-left) point of the rectangle */ getOrigin(): Point; /** * Get the corner (bottom-right) point of the rectangle */ getCorner(): Point; /** * Check if a point is contained within this rectangle (interior only, excluding edges) */ containsPoint(point: Point): boolean; /** * Move and expand the rectangle by a box offset */ moveAndExpand(box: { x: number; y: number; width: number; height: number; }): Rectangle; } //# sourceMappingURL=Rectangle.d.ts.map