Button Image Alignment Fix (#272, #30)

Changed button element from button to div for consistent rendering
across browsers.
This commit is contained in:
Mark Salsbery 2013-12-06 11:22:51 -08:00
parent dfcb9f381e
commit a6a21d21ae

View File

@ -120,7 +120,7 @@ $.Button = function( options ) {
* @member {Element} element * @member {Element} element
* @memberof OpenSeadragon.Button# * @memberof OpenSeadragon.Button#
*/ */
this.element = options.element || $.makeNeutralElement( "button" ); this.element = options.element || $.makeNeutralElement( "div" );
//if the user has specified the element to bind the control to explicitly //if the user has specified the element to bind the control to explicitly
//then do not add the default control images //then do not add the default control images
@ -183,6 +183,7 @@ $.Button = function( options ) {
// Whether this button should fade after user stops interacting with the viewport. // Whether this button should fade after user stops interacting with the viewport.
this.shouldFade = false; this.shouldFade = false;
this.element.style.cursor = "pointer";
this.element.style.display = "inline-block"; this.element.style.display = "inline-block";
this.element.style.position = "relative"; this.element.style.position = "relative";
this.element.title = this.tooltip; this.element.title = this.tooltip;