@logicflow/extension
Version:
LogicFlow Extensions
25 lines (24 loc) • 748 B
TypeScript
import LogicFlow from '@logicflow/core';
type ControlItem = {
key: string;
iconClass: string;
title: string;
text: string;
onClick?: (lf: LogicFlow, e: MouseEvent) => void;
onMouseEnter?: (lf: LogicFlow, e: MouseEvent) => void;
onMouseLeave?: (lf: LogicFlow, e: MouseEvent) => void;
};
export declare class Control {
static pluginName: string;
private readonly lf;
private controlItems;
private domContainer?;
private toolEl?;
constructor({ lf }: LogicFlow.IExtensionProps);
render(_: LogicFlow, domContainer: HTMLElement): void;
destroy(): void;
addItem(item: ControlItem): void;
removeItem(key: string): ControlItem | null;
private getControlTool;
}
export default Control;