Skip to content

WasmGPU.createAnnotation.toolkit().cancel

Summary

WasmGPU.createAnnotation.toolkit().cancel resets mode to idle and clears any staged anchors. Use it to abort an in-progress distance/angle annotation gesture.

Syntax

WasmGPU.createAnnotation.toolkit().cancel(): this
toolkit.cancel();

Parameters

This API does not take parameters.

Returns

this - Returns the same toolkit.

Example

const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const toolkit = wgpu.createAnnotation.toolkit({ canvas });

toolkit.setMode("angle");
toolkit.cancel();

See Also