Thank for your support. But it is not working. I’m using apryse version 10.12.0
const standardCommentsButton = new instance.UI.Components.CustomButton({
dataElement: ‘customButton’,
label: ‘test’,
img: ‘’,
title: ‘this is a test button’,
onClick: () => console.log(‘button clicked!’),
});
console.log(instance.UI);
const toolHeader = instance.UI.getModularHeader(‘tools-header’);
let annotateGrpItem = toolHeader
.getItems(‘groupedItems’)
.find((data) => data.dataElement === ‘annotateGroupedItems’);
let annotateToolGrpItem = annotateGrpItem.items.find(
(data) => data.dataElement === ‘annotateToolsGroupedItems’
);
annotateToolGrpItem.items.push(standardCommentsButton);
toolHeader.setItems([…toolHeader.getItems()]);
Using like this but button is not visible in annotation.
For 10.12 legacy UI, there are limitations to customizing the UI. The actionButton cannot be part of the default toolGroup. Please see the following code: