Get the current mouse mode of mouse dragging

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version

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

Hi there,

You can add an event listener to the Pan Tool:

To get current tool, you can use the getToolMode API:

Best regards,
Kevin Kim