How to label the preset buttons that comes out of the box in webviewer.
Also how to set tooltip for preset buttons.
1 Like
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.
Labeling default buttons in WebViewer involves customizing the UI elements. WebViewer provides APIs to modify existing UI components, including adding labels to buttons. Customizing buttons often involves accessing the button element and modifying its properties or using the WebViewer’s built-in methods to change its appearance.
Some things you can try:
- Identify the button you want to label by using its data-element attribute.
- Use the
instance.UI.setHeaderItems
method to modify the header items and add labels where needed. - Customize button properties such as
title
orinnerText
to set the label text. - Ensure your changes are applied after the WebViewer instance is fully initialized.
Here are some resources that might help you:
- WebViewer Modular UI Items: Learn about the different UI components and how to customize them.
- Customizing Annotation Tools: Understand how to customize tool buttons and their properties.
- WebViewer Basics: Get an overview of WebViewer and how to perform common customizations.
- Creating Annotations in WebViewer: Explore how to work with annotation tools, which might include labeling.
Hopefully, this helps you solve your problem while you wait for a human to get back to you.
1 Like
Hello Fiona,
Are you getting a 404 error for a translation file in the network tab? Could you provide the code you have for your preset button?
Best Regards,
Darian
The lib folder is hosed in Azure. And we are getting CORS policy error accessing the translation file.
Can you provide the request and response headers for this file? Are there any other 404 errors in the network?