diff --git a/src/viewer.js b/src/viewer.js index c800dcba..82db55ec 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -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}