add custom button

This commit is contained in:
Mohit Bansal 2023-02-27 23:52:29 +05:30
parent 59083b7669
commit f393547d9e

View File

@ -978,6 +978,17 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
this.forceRedraw();
},
/**
* Add custom button for this viewer.
*
* @functions
* @param {Element} CustomButton A reference to an element.
*/
addButton: function( Custombutton ){
this.buttonGroup.buttons.push(Custombutton);
this.buttonGroup.element.appendChild(Custombutton.element);
},
/**
* @function
* @returns {Boolean}