BaseTool
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:45
Extended by
Section titled “Extended by”Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BaseTool():
BaseTool
Returns
Section titled “Returns”BaseTool
Properties
Section titled “Properties”callbacks
Section titled “callbacks”
protectedcallbacks:ToolCallbacks|null
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:49
imageId
Section titled “imageId”
protectedimageId:ImageId|null
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:48
overlay
Section titled “overlay”
protectedoverlay:ToolOverlay|null
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:47
shortcuts
Section titled “shortcuts”
protectedshortcuts:KeyboardShortcutMap|null
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:50
abstractreadonlytype:ToolType|"select"
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:46
Tool identifier
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”activate()
Section titled “activate()”activate(
overlay,imageId,callbacks,shortcuts):void
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:51
Called when the tool becomes active
Parameters
Section titled “Parameters”overlay
Section titled “overlay”imageId
Section titled “imageId”callbacks
Section titled “callbacks”shortcuts
Section titled “shortcuts”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”cancel()
Section titled “cancel()”
abstractcancel():void
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:57
Cancel the current drawing interaction
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”deactivate()
Section titled “deactivate()”deactivate():
void
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:53
Called when the tool is deactivated
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”onKeyDown()
Section titled “onKeyDown()”onKeyDown(
event):boolean
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:52
Handle key down - returns true if the key was consumed
Parameters
Section titled “Parameters”KeyboardEvent
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”onPointerDown()
Section titled “onPointerDown()”
abstractonPointerDown(event,imagePoint):void
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:54
Handle pointer down — start drawing
Parameters
Section titled “Parameters”PointerEvent
imagePoint
Section titled “imagePoint”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”onPointerMove()
Section titled “onPointerMove()”
abstractonPointerMove(event,imagePoint):void
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:55
Handle pointer move — update drawing preview
Parameters
Section titled “Parameters”PointerEvent
imagePoint
Section titled “imagePoint”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”onPointerUp()
Section titled “onPointerUp()”
abstractonPointerUp(event,imagePoint):void
Defined in: packages/fabric-annotations/dist/tools/base-tool.d.ts:56
Handle pointer up — commit the annotation
Parameters
Section titled “Parameters”PointerEvent
imagePoint
Section titled “imagePoint”Returns
Section titled “Returns”void