UNPKG

@plait/draw

Version:

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

26 lines (25 loc) 1.23 kB
import { ResizeRef, ResizeState } from '@plait/common'; import { DirectionFactors, PlaitBoard, PlaitElement, Point, RectangleClient, SnapRef } from '@plait/core'; import { PlaitCustomGeometry, PlaitDrawElement } from '../interfaces'; export declare const debugGenerator: import("@plait/core").DebugGenerator; export interface ResizeSnapRef extends SnapRef { xZoom: number; yZoom: number; activePoints: Point[]; } export interface ResizeSnapOptions { resizePoints: Point[]; activeRectangle: RectangleClient; directionFactors: DirectionFactors; isFromCorner: boolean; isAspectRatio: boolean; resizeOriginPoint?: Point[]; originPoint?: Point; handlePoint?: Point; isCreate?: boolean; } export declare function getSnapResizingRefOptions(board: PlaitBoard, resizeRef: ResizeRef<PlaitDrawElement | PlaitCustomGeometry | (PlaitDrawElement | PlaitCustomGeometry)[]>, resizeState: ResizeState, resizeOriginPointAndHandlePoint: { originPoint: Point; handlePoint: Point; }, isAspectRatio: boolean, isFromCorner: boolean): ResizeSnapOptions; export declare function getSnapResizingRef(board: PlaitBoard, activeElements: PlaitElement[], resizeSnapOptions: ResizeSnapOptions): ResizeSnapRef;