onCleanup Method
Invoked when the tool becomes no longer active, to perform additional cleanup logic. Cleanup must not assume that the EditCommand associated with the tool is still active: an immediate tool may have finished or replaced it while this tool remained active. Tools must not start an EditCommand from onCleanup; ToolAdmin owns finishing the active EditCommand during tool cleanup.
onCleanup(): Promise<void>
@note A ViewTool should never start an EditCommand. An InputCollector may start an EditCommand only if suspending a tool that supports EditManipulators (ex. SelectionTool).
Returns - Promise
Defined in
- core/frontend/src/tools/Tool.ts Line 515
Last Updated: 03 September, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.