mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
add given button function to buttongroup
This commit is contained in:
parent
f393547d9e
commit
8a201c12b4
@ -112,6 +112,17 @@ $.ButtonGroup = function( options ) {
|
||||
/** @lends OpenSeadragon.ButtonGroup.prototype */
|
||||
$.ButtonGroup.prototype = {
|
||||
|
||||
/**
|
||||
* Adds the given button to this button group.
|
||||
*
|
||||
* @functions
|
||||
* @param {OpenSeadragon.Button} button
|
||||
*/
|
||||
addButton: function( button ){
|
||||
this.buttons.push(button);
|
||||
this.element.appendChild(button.element);
|
||||
},
|
||||
|
||||
/**
|
||||
* TODO: Figure out why this is used on the public API and if a more useful
|
||||
* api can be created.
|
||||
|
@ -978,15 +978,14 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
this.forceRedraw();
|
||||
},
|
||||
|
||||
/**
|
||||
* Add custom button for this viewer.
|
||||
/**
|
||||
* Adds the given button to this viewer.
|
||||
*
|
||||
* @functions
|
||||
* @param {Element} CustomButton A reference to an element.
|
||||
* @param {OpenSeadragon.Button} button
|
||||
*/
|
||||
addButton: function( Custombutton ){
|
||||
this.buttonGroup.buttons.push(Custombutton);
|
||||
this.buttonGroup.element.appendChild(Custombutton.element);
|
||||
addButton: function( button ){
|
||||
this.buttonGroup.addButton(button);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user