When the document load event occurs, I want the PAN tool to be selected by default.
Currently I have set the FREETEXT to be selected when the document is loaded.
But going forward I have a change request to make the PAN tool to be selected when the document is first loaded
But it seems like an impossible task. Below are what I have already tried.
Hello, Iām AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
To set the PAN tool as the default tool when a document loads in WebViewer, you need to ensure that the tool is set after the document has fully loaded, using the correct tool mode identifier.
Some things you can try:
Ensure that you are using the correct tool name for the PAN tool, which is instance.Core.Tools.ToolNames.PAN.
Use the documentLoaded event to set the tool mode, ensuring that it is triggered after the document has fully loaded.
Verify that the event listener is correctly attached and the function is being called as expected.
Make sure there are no other conflicting tool mode settings being applied after your code runs.
Thank you very much for the solution.
I tried it and it kind of worked.
The problem is when I open the application (document loaded) the PAN tool is selected by default (which I wanted), but it gets unselected just after 1 second.
I have checked the code and nowhere the toolMode is changed programmatically.
Unfortunately, I cannot share the file here as it is against my organizationās policy.
However, I can simplify it by removing the business logic and share here.
Or do you want me to submit a ticket using the link you provided?