mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Trailing whitespace fixes
This commit is contained in:
parent
c6bea68b4e
commit
4152b8b866
@ -98,9 +98,9 @@ $.IIIFTileSource = function( options ){
|
||||
}
|
||||
|
||||
if ( !options.maxLevel ) {
|
||||
if ( !this.scale_factors ) {
|
||||
options.maxLevel = Number( Math.ceil( Math.log( Math.max( this.width, this.height ), 2 ) ) );
|
||||
} else {
|
||||
if ( !this.scale_factors ) {
|
||||
options.maxLevel = Number( Math.ceil( Math.log( Math.max( this.width, this.height ), 2 ) ) );
|
||||
} else {
|
||||
options.maxLevel = Math.floor( Math.pow( Math.max.apply(null, this.scale_factors), 0.5) );
|
||||
}
|
||||
}
|
||||
@ -128,7 +128,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
||||
return true;
|
||||
|
||||
// Version 1.0
|
||||
} else if ( data.profile &&
|
||||
} else if ( data.profile &&
|
||||
data.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html") === 0) {
|
||||
return true;
|
||||
} else if ( data.identifier && data.width && data.height ) {
|
||||
@ -166,7 +166,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
||||
configure: function( data, url ){
|
||||
// Try to deduce our version and fake it upwards if needed
|
||||
if ( !$.isPlainObject(data) ) {
|
||||
var options = configureFromXml10( data );
|
||||
var options = configureFromXml10( data );
|
||||
options['@context'] = "http://iiif.io/api/image/1.0/context.json";
|
||||
options['@id'] = url.replace('/info.xml', '');
|
||||
return options;
|
||||
|
@ -263,7 +263,7 @@ $.TileSource.prototype = /** @lends OpenSeadragon.TileSource.prototype */{
|
||||
tiles;
|
||||
for( i = this.minLevel; i < this.maxLevel; i++ ){
|
||||
tiles = this.getNumTiles( i );
|
||||
tilesPerSide = Math.floor( Math.max( rect.x, rect.y ) / this.getTileSize(i) );
|
||||
tilesPerSide = Math.floor( Math.max( rect.x, rect.y ) / this.getTileSize(i) );
|
||||
if( Math.max( tiles.x, tiles.y ) + 1 >= tilesPerSide ){
|
||||
break;
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
|
||||
* @param {OpenSeadragon.Rect} bounds
|
||||
* @param {Boolean} immediately
|
||||
* @return {OpenSeadragon.Rect} constrained bounds.
|
||||
*/
|
||||
*/
|
||||
_applyBoundaryConstraints: function( bounds, immediately ) {
|
||||
var horizontalThreshold,
|
||||
verticalThreshold,
|
||||
@ -402,9 +402,9 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
|
||||
this.viewer.raiseEvent( 'constrain', {
|
||||
immediately: immediately
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return newBounds;
|
||||
return newBounds;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -523,7 +523,7 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
|
||||
);
|
||||
|
||||
return this.zoomTo( newZoom, referencePoint, immediately );
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* @function
|
||||
|
Loading…
Reference in New Issue
Block a user