Get the current mouse mode of mouse dragging

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version
8.7.4

Detailed description of issue
Is there any API we can call to get the current mode (pan/select) for mouse dragging?

Expected behaviour
If we are currently in the select mode then the custom function in event will be triggered when clicking or moving the mouse on the page; if we are in the pan mode, the function will not be triggered, only moving the document
image

Hi there,

You can add an event listener to the Pan Tool:
https://pdfjs.express/api/Core.Tools.PanTool.html

To get current tool, you can use the getToolMode API:
https://pdfjs.express/api/Core.DocumentViewer.html#getToolMode__anchor

Best regards,
Kevin Kim