Interface
DrawingToolJs
A drawing tool for Drawings.register.
Properties
| Name | Type | Description |
|---|---|---|
anchorCount | number | {
open: number;
} | 'freehand' | How it is created: a number (1–64) of clicks; |
Methods
build
build(ctx: DrawingToolCtx): PluginCommand[];hitTest
hitTest?(ctx: DrawingToolCtx, point: {
x: number;
y: number;
}): boolean | number;true: the drawing is hit; a number: that handle (anchor); false: not hit. Default: hit inside the drawn bounds.
Declaration
export interface DrawingToolJs {
anchorCount: number | {
open: number;
} | 'freehand';
build(ctx: DrawingToolCtx): PluginCommand[];
hitTest?(ctx: DrawingToolCtx, point: {
x: number;
y: number;
}): boolean | number;
}