UNPKG

@logicflow/extension

Version:
46 lines (45 loc) 1.42 kB
import LogicFlow, { GraphModel, DiamondNode, DiamondNodeModel } from '@logicflow/core'; import { PCTResizeParams } from './RectResize'; import NodeConfig = LogicFlow.NodeConfig; export type ResizeDiamondNodeConfig = NodeConfig & { properties: { nodeSize: { rx: number; ry: number; }; } & Record<string, unknown>; }; export declare class DiamondResizeModel extends DiamondNodeModel { PCTResizeInfo?: PCTResizeParams; minWidth: number; minHeight: number; maxWidth: number; maxHeight: number; constructor(data: ResizeDiamondNodeConfig, graphModel: GraphModel); initNodeData(data: any): void; getOutlineStyle(): LogicFlow.OutlineTheme; getResizeOutlineStyle(): { fill: string; stroke: string; strokeWidth: number; strokeDasharray: string; }; getControlPointStyle(): { width: number; height: number; fill: string; stroke: string; }; enableProportionResize(turnOn?: boolean): void; } export declare class DiamondResizeView extends DiamondNode { getControlGroup(): import("preact").JSX.Element; getResizeShape(): import("preact").JSX.Element; getShape(): import("preact").JSX.Element; } export declare const DiamondResize: { type: string; view: typeof DiamondResizeView; model: typeof DiamondResizeModel; }; export default DiamondResize;