@plait/draw
Version:
Implementation of the core logic of the flowchart drawing tool plugin.
30 lines (29 loc) • 1.18 kB
TypeScript
import { PlaitBoard, PlaitElement } from '@plait/core';
import { GeometryShapes, PlaitDrawElement } from '../interfaces';
import { DrawPointerType } from '../constants';
import { BaseOperation } from 'slate';
export declare const getMemorizeKey: (element: PlaitElement) => string;
export declare const getLineMemorizedLatest: () => {
[x: string]: any;
id: string;
children?: PlaitElement[];
points?: import("@plait/core").Point[];
type?: string;
groupId?: string;
angle?: number;
};
export declare const getMemorizedLatestByPointer: (pointer: DrawPointerType) => {
textProperties: any;
geometryProperties: {
[x: string]: any;
id: string;
children?: PlaitElement[];
points?: import("@plait/core").Point[];
type?: string;
groupId?: string;
angle?: number;
};
};
export declare const memorizeLatestText: <T extends PlaitElement = PlaitDrawElement>(element: T, operations: BaseOperation[]) => void;
export declare const memorizeLatestShape: (board: PlaitBoard, shape: GeometryShapes) => void;
export declare const getMemorizedLatestShape: (board: PlaitBoard) => GeometryShapes[] | undefined;