Tool mode names documentation is misleading

Hi there.

While seeking to set the tool mode in our viewer to pan by default, I found that the documentation is misleading.

PDFJS Express WebViewer Namespace: Tools leads me (at least) to think the list of capitalised names is what you need to supply to the setToolMode method. Stepping through the JS reveals that this isn’t the case. In my case, I needed:

instance.setToolMode(‘Pan’);

Regards,

Nigel

Hi,

Those are all constants and this is a very common pattern in any kind of SDK/library.

setToolMode(instance.Tools.ToolNames.PAN)

Thanks!