Message API/docs/components/measurement/clear

Clear

Exit measurement mode and reset active tools.

Overview

To stop measuring and return to the standard selection tool, send the clear command.

Note that the Snap state remains active unless explicitly toggled off using the SNAP action.

Implementation

Send a clear command to reset the viewer.

Clear Command

const viewerOrigin = '*';
iframeEl.contentWindow.postMessage({
  type: 'toolControl',
  payload: { command: 'clear' }
}, viewerOrigin);

Additional Resources

Continue with related measurement workflows and API references.