In Js/Angular version I can add a custom button to Viewer using this code:
Code: Select all
const userButton = this.viewer.jsObject.SmallButton('userButton', 'X', null);
userButton.action = function () {
this.myMethod();
};
const toolbarTable = this.viewer.jsObject.controls.toolbar.firstChild.firstChild;
const buttonsTable = toolbarTable.rows[0].lastChild.lastChild;
const userButtonCell = buttonsTable.rows[0].insertCell(0);
userButtonCell.className = 'stiJsViewerClearAllStyles';
userButtonCell.appendChild(userButton);
userButton.myMethod = this.onClose;
userButton.modalService = this.modalService;
userButton.outResult = this.outResult;
userButton.id = 'userButton';
thanks