UNPKG

@plait/draw

Version:

Implementation of the core logic of the flowchart drawing tool plugin.

30 lines (29 loc) 1.35 kB
import { Point, PlaitBoard, RectangleClient, PointOfRectangle, Direction, Vector, Path } from '@plait/core'; import { ArrowLineHandleRefPair, PlaitArrowLine, PlaitShapeElement } from '../../interfaces'; export declare const getArrowLineHandleRefPair: (board: PlaitBoard, element: PlaitArrowLine) => ArrowLineHandleRefPair; export declare const getConnectionPoint: (geometry: PlaitShapeElement, connection: Point, direction?: Direction, delta?: number) => Point; export declare const getVectorByConnection: (boundElement: PlaitShapeElement, connection: PointOfRectangle) => Vector; export declare const getElbowLineRouteOptions: (board: PlaitBoard, element: PlaitArrowLine, handleRefPair?: ArrowLineHandleRefPair) => { sourcePoint: PointOfRectangle; nextSourcePoint: Point; sourceRectangle: RectangleClient; sourceOuterRectangle: { x: number; y: number; width: number; height: number; }; targetPoint: PointOfRectangle; nextTargetPoint: Point; targetRectangle: RectangleClient; targetOuterRectangle: { x: number; y: number; width: number; height: number; }; }; export declare const collectArrowLineUpdatedRefsByGeometry: (board: PlaitBoard, element: PlaitShapeElement, refs: { property: Partial<PlaitArrowLine>; path: Path; }[]) => void;