HI
I am evaluating the product and I need to hide the bookmark button on the left panel
i tried to delete it with this code but outlinesPanelButton gets hidden, bookmarksPanelButton remains visible
WebViewer(
{
path: ‘…/…/…/lib’,
initialDoc: ‘…/…/…/samples/files/R173A2020F03.pdf’,
disabledElements: [
‘bookmarksPanelButton’,
‘outlinesPanelButton’
]
},
is it also possible to change the order of the buttons? via DOM?
i found this solution for hide buttons
var bookmarksPanelButton = instance.iframeWindow.document.querySelector(‘button[data-element=“bookmarksPanelButton”]’);
bookmarksPanelButton.style= ‘display: none’
var outlinesPanelButton = instance.iframeWindow.document.querySelector('button[data-element="outlinesPanelButton"]');
outlinesPanelButton.style= 'display: none'
to change order
var customPanelTab = instance.iframeWindow.document.querySelector(‘button[data-element=“customPanelTab”]’);
var thumbnailsPanelButton = instance.iframeWindow.document.querySelector(‘button[data-element=“thumbnailsPanelButton”]’);
customPanelTab.parentNode.insertBefore(customPanelTab, thumbnailsPanelButton);
2 Likes