mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-20 01:31:45 +03:00
Minor style fixes
This commit is contained in:
parent
48eee7e75c
commit
7d4eff0bb8
@ -15,14 +15,23 @@
|
||||
|
||||
options.tileSize = 256;
|
||||
|
||||
var currentImageSize = {x:options.width,y:options.height};
|
||||
options.imageSizes = [{x:options.width,y:options.height}];
|
||||
var currentImageSize = {
|
||||
x: options.width,
|
||||
y: options.height
|
||||
};
|
||||
options.imageSizes = [{
|
||||
x: options.width,
|
||||
y: options.height
|
||||
}];
|
||||
options.gridSize = [this._getGridSize(options.width, options.height, options.tileSize)];
|
||||
|
||||
while(parseInt(currentImageSize.x) > options.tileSize || parseInt(currentImageSize.y) > options.tileSize) {
|
||||
while (parseInt(currentImageSize.x, 10) > options.tileSize || parseInt(currentImageSize.y, 10) > options.tileSize) {
|
||||
currentImageSize.x = Math.floor(currentImageSize.x / 2);
|
||||
currentImageSize.y = Math.floor(currentImageSize.y / 2);
|
||||
options.imageSizes.push({x:currentImageSize.x,y:currentImageSize.y});
|
||||
options.imageSizes.push({
|
||||
x: currentImageSize.x,
|
||||
y: currentImageSize.y
|
||||
});
|
||||
options.gridSize.push(this._getGridSize(currentImageSize.x, currentImageSize.y, options.tileSize));
|
||||
}
|
||||
options.imageSizes.reverse();
|
||||
@ -37,10 +46,15 @@
|
||||
|
||||
$.extend($.ZoomifyTileSource.prototype, $.TileSource.prototype, /** @lends OpenSeadragon.ZoomifyTileSource.prototype */ {
|
||||
|
||||
//private
|
||||
_getGridSize: function(width, height, tileSize) {
|
||||
return {x: Math.ceil(width/tileSize),y:Math.ceil(height/tileSize)};
|
||||
return {
|
||||
x: Math.ceil(width / tileSize),
|
||||
y: Math.ceil(height / tileSize)
|
||||
};
|
||||
},
|
||||
|
||||
//private
|
||||
_calculateAbsoluteTileNumber: function(level, x, y) {
|
||||
var num = 0;
|
||||
for (var z = 0; z < level; z++) {
|
||||
@ -60,7 +74,6 @@
|
||||
* @param {String} optional - url
|
||||
*/
|
||||
supports: function(data, url) {
|
||||
//console.log('ZoomifyTileSource supports ' + data.type);
|
||||
return (data.type && "zoomifytileservice" == data.type);
|
||||
},
|
||||
|
||||
@ -73,7 +86,6 @@
|
||||
* to configure this tile sources constructor.
|
||||
*/
|
||||
configure: function(data, url) {
|
||||
//console.log('ZoomifyTileSource configure ' + data.tilesUrl);
|
||||
return data;
|
||||
},
|
||||
|
||||
@ -91,7 +103,7 @@
|
||||
result = Math.floor(num / 256);
|
||||
return this.tilesUrl + 'TileGroup' + result + '/' + level + '-' + x + '-' + y + '.jpg';
|
||||
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
}(OpenSeadragon));
|
Loading…
x
Reference in New Issue
Block a user