Hi Adam,
To enable the snap mode in the Webviewer on the measurement tools, you could use
Webviewer({
...,
enableMeasurement: true
}, document.getElementById('viewer')).then(async instance => {
const { documentViewer } = instance.Core;
documentViewer.addEventListener('documentLoaded', async () => {
instance.Core.documentViewer.getTool("AnnotationCreateDistanceMeasurement").setSnapMode(
instance.Core.Tools.SnapModes.DEFAULT
);
instance.Core.annotationManager.setSnapDefaultOptions({
indicatorColor: "#00a5e4",
});
});
});
There are also other measurement tools and snap modes you could replace in : PDFTron WebViewer Namespace: Tools. You could also checkout the link: Core.AnnotationManager.setSnapDefaultOptions to set default snap options.
Please let us know if this resolve your issue, thank you.