Merge 99d6ff80b6
into 69709a9666
0
images/fullpage_grouphover.png
Executable file → Normal file
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
0
images/fullpage_hover.png
Executable file → Normal file
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
0
images/fullpage_pressed.png
Executable file → Normal file
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
0
images/fullpage_rest.png
Executable file → Normal file
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
0
images/home_grouphover.png
Executable file → Normal file
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
0
images/home_hover.png
Executable file → Normal file
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
0
images/home_pressed.png
Executable file → Normal file
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
0
images/home_rest.png
Executable file → Normal file
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
0
images/zoomin_grouphover.png
Executable file → Normal file
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
0
images/zoomin_hover.png
Executable file → Normal file
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
0
images/zoomin_pressed.png
Executable file → Normal file
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
0
images/zoomin_rest.png
Executable file → Normal file
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
0
images/zoomout_grouphover.png
Executable file → Normal file
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
0
images/zoomout_hover.png
Executable file → Normal file
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
0
images/zoomout_pressed.png
Executable file → Normal file
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
0
images/zoomout_rest.png
Executable file → Normal file
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
@ -377,7 +377,7 @@ $.Drawer.prototype = {
|
|||
element.href = "#/overlay/"+id;
|
||||
}
|
||||
element.id = id;
|
||||
element.className = element.className + " " + ( overlay.className ?
|
||||
$.addClass( element, overlay.className ?
|
||||
overlay.className :
|
||||
"openseadragon-overlay"
|
||||
);
|
||||
|
|
|
@ -1025,6 +1025,48 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
|||
},
|
||||
|
||||
|
||||
/**
|
||||
* Add the specified CSS class to the element if not present.
|
||||
* @name $.addClass
|
||||
* @function
|
||||
* @param {Element|String} element
|
||||
* @param {String} className
|
||||
*/
|
||||
addClass: function( element, className ) {
|
||||
element = $.getElement( element );
|
||||
|
||||
if ( ! element.className ) {
|
||||
element.className = className;
|
||||
} else if ( ( ' ' + element.className + ' ' ).
|
||||
indexOf( ' ' + className + ' ' ) === -1 ) {
|
||||
element.className += ' ' + className;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Remove the specified CSS class from the element.
|
||||
* @name $.removeClass
|
||||
* @function
|
||||
* @param {Element|String} element
|
||||
* @param {String} className
|
||||
*/
|
||||
removeClass: function( element, className ) {
|
||||
var oldClasses,
|
||||
newClasses = [],
|
||||
i;
|
||||
|
||||
element = $.getElement( element );
|
||||
oldClasses = element.className.split( /\s+/ );
|
||||
for ( i = 0; i < oldClasses.length; i++ ) {
|
||||
if ( oldClasses[ i ] && oldClasses[ i ] !== className ) {
|
||||
newClasses.push( oldClasses[ i ] );
|
||||
}
|
||||
}
|
||||
element.className = newClasses.join(' ');
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Adds an event listener for the given element, eventName and handler.
|
||||
* @function
|
||||
|
|
|
@ -515,12 +515,10 @@ $.extend( $.Viewer.prototype, $.EventHandler.prototype, $.ControlDock.prototype,
|
|||
|
||||
//Make sure the user has some ability to style the toolbar based
|
||||
//on the mode
|
||||
this.toolbar.element.setAttribute(
|
||||
'class',
|
||||
this.toolbar.element.className +" fullpage"
|
||||
);
|
||||
$.addClass( this.toolbar.element, 'fullpage' );
|
||||
}
|
||||
|
||||
$.addClass( this.element, 'fullpage' );
|
||||
body.appendChild( this.element );
|
||||
|
||||
if( $.supportsFullScreen ){
|
||||
|
@ -590,6 +588,8 @@ $.extend( $.Viewer.prototype, $.EventHandler.prototype, $.ControlDock.prototype,
|
|||
for ( i = 0; i < nodes; i++ ){
|
||||
body.appendChild( this.previousBody.shift() );
|
||||
}
|
||||
|
||||
$.removeClass( this.element, 'fullpage' );
|
||||
THIS[ this.hash ].prevElementParent.insertBefore(
|
||||
this.element,
|
||||
THIS[ this.hash ].prevNextSibling
|
||||
|
@ -602,10 +602,7 @@ $.extend( $.Viewer.prototype, $.EventHandler.prototype, $.ControlDock.prototype,
|
|||
|
||||
//Make sure the user has some ability to style the toolbar based
|
||||
//on the mode
|
||||
this.toolbar.element.setAttribute(
|
||||
'class',
|
||||
this.toolbar.element.className.replace('fullpage','')
|
||||
);
|
||||
$.removeClass( this.toolbar.element, 'fullpage' );
|
||||
//this.toolbar.element.style.position = 'relative';
|
||||
this.toolbar.parentNode.insertBefore(
|
||||
this.toolbar.element,
|
||||
|
|