mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Merge pull request #2306 from MohitBansal321/addButton
add custom button for this viewer
This commit is contained in:
commit
afae0ec5ec
@ -112,6 +112,17 @@ $.ButtonGroup = function( options ) {
|
|||||||
/** @lends OpenSeadragon.ButtonGroup.prototype */
|
/** @lends OpenSeadragon.ButtonGroup.prototype */
|
||||||
$.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
|
* TODO: Figure out why this is used on the public API and if a more useful
|
||||||
* api can be created.
|
* api can be created.
|
||||||
|
@ -978,6 +978,16 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
this.forceRedraw();
|
this.forceRedraw();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the given button to this viewer.
|
||||||
|
*
|
||||||
|
* @functions
|
||||||
|
* @param {OpenSeadragon.Button} button
|
||||||
|
*/
|
||||||
|
addButton: function( button ){
|
||||||
|
this.buttonGroup.addButton(button);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @function
|
* @function
|
||||||
* @returns {Boolean}
|
* @returns {Boolean}
|
||||||
|
Loading…
Reference in New Issue
Block a user