onRestartTool Method
Called when an external event may invalidate the current tool's state. Examples are undo, which may invalidate any references to elements, or an incompatible active view change. The active tool is expected to call installTool with a new instance, or exitTool to start the default tool.
const tool = new MyPrimitiveTool();
if (!await tool.run())
return this.exitTool(); // Don't leave current instance active if new instance rejects install...
onRestartTool(): Promise<void>
Returns - Promise
Defined in
- markup/src/RedlineTool.ts Line 44
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.