import { Path } from '../Path'; import { TSimpleParsedCommand } from '../../util'; import { Point, XY } from '../../Point'; import { Transform } from '../../EventTypeDefs'; import { WidgetConnectorInterface } from './type/widget.entity.connector'; import { WidgetType } from './type/widget.type'; declare class XConnector extends Path implements WidgetConnectorInterface { static type: WidgetType; static objType: WidgetType; style: any; fromObjectId: string; toObjectId: string; pathType: 'curvePath' | 'straightPath'; pathArrowTip: 'none' | 'start' | 'end' | 'both'; fromPoint: XY; toPoint: XY; control1: XY; control2: XY; /** * Contains the path to draw the arrow tip start */ pathStart: TSimpleParsedCommand[]; /** * Contains the path to draw the arrow tip end */ pathEnd: TSimpleParsedCommand[]; constructor(fromPoint: XY, toPoint: XY, control1: XY, control2: XY, options?: any); updatedBy: string; updatedByName: string; createdByName: string; boardId: string; objType: WidgetType; userId: string; zIndex: number; version: string; updatedAt: number; createdAt: number; createdBy: string; getFromPoint(): Point; getObject(): Record; getToPoint(): Point; /** * calculate the drawing commands for the connector tips */ calcStartEndPath(): void; calculateControlPoint(controlPointType: 'from' | 'to', point: any): any; /** * Given the points in scene coordinates, updates the path * This function is called by other objects that are moving or changing properties */ update({ fromPoint, toPoint, control1, control2, style }?: any): void; _mouseDownControl(eventData: any, transform: Transform, x: number, y: number): void; mouseDownHandler(eventData: any, transform: Transform, x: number, y: number): void; mouseUpHandler(eventData: any, transform: Transform, x: number, y: number): void; /** * Compared to Path, it will render the official Path + the arrow tips. * @param ctx */ _renderPathCommands(ctx: CanvasRenderingContext2D): void; _mouseUpControl(eventData: any, transform: Transform, x: number, y: number): void; _setMovementLock(): void; getControlPointOnCanvas(obj: any, controlName: string): any; /** * Responds to the path points being moved calculating the docking. * @param commandIndex The command index in the path we are dragging * @param pointIndex the index of the X coordinate of the point we are moving in .path[commandIndex] * @returns */ dragActionEventHandler(commandIndex: number, pointIndex: number): void; } export { XConnector }; export declare const TransformPointFromPathToCanvas: (object: XConnector, point: Point) => Point; //# sourceMappingURL=XConnector.d.ts.map