photo-editor
Version:
Simple and customizable photo editor for web applications.
31 lines (27 loc) • 812 B
TypeScript
import { EventEmitter } from 'eventemitter3';
type ToolOptions = Readonly<{
el: HTMLCanvasElement;
pushState: (nextState: string) => void;
updateState: (nextState: string) => void;
disable: () => void;
touch: () => void;
}>;
declare class Tool extends EventEmitter {
el: HTMLCanvasElement | null;
enabled: boolean;
pushState: (nextState: string) => void;
updateState: (nextState: string) => void;
touch: () => void;
disable: () => void;
constructor(options: ToolOptions);
onBeforeDisable(): void;
onAfterDisable(): void;
onBeforeEnable(): void;
onAfterEnable(): void;
onBeforeDestroy(): void;
disableFromEditor(): void;
enableFromEditor(): void;
destroy(): void;
reset(): void;
}
export { Tool as T, type ToolOptions as a };