mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 21:26:10 +03:00
renamed psuedo-private accessor _getNumTiles to actual private numberOfTiles
This commit is contained in:
parent
c8b4197f79
commit
8424c78c4b
@ -3446,14 +3446,6 @@ $.Drawer = function(source, viewport, elmt) {
|
|||||||
|
|
||||||
$.Drawer.prototype = {
|
$.Drawer.prototype = {
|
||||||
|
|
||||||
_getNumTiles: function(level) {
|
|
||||||
if (!this.cacheNumTiles[level]) {
|
|
||||||
this.cacheNumTiles[level] = this.source.getNumTiles(level);
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.cacheNumTiles[level];
|
|
||||||
},
|
|
||||||
|
|
||||||
_getPixelRatio: function(level) {
|
_getPixelRatio: function(level) {
|
||||||
if (!this.cachePixelRatios[level]) {
|
if (!this.cachePixelRatios[level]) {
|
||||||
this.cachePixelRatios[level] = this.source.getPixelRatio(level);
|
this.cachePixelRatios[level] = this.source.getPixelRatio(level);
|
||||||
@ -3772,7 +3764,7 @@ $.Drawer.prototype = {
|
|||||||
|
|
||||||
var tileTL = this.source.getTileAtPoint(level, viewportTL);
|
var tileTL = this.source.getTileAtPoint(level, viewportTL);
|
||||||
var tileBR = this.source.getTileAtPoint(level, viewportBR);
|
var tileBR = this.source.getTileAtPoint(level, viewportBR);
|
||||||
var numTiles = this._getNumTiles(level);
|
var numTiles = numberOfTiles( this, level );
|
||||||
var numTilesX = numTiles.x;
|
var numTilesX = numTiles.x;
|
||||||
var numTilesY = numTiles.y;
|
var numTilesY = numTiles.y;
|
||||||
if (!wrapHorizontal) {
|
if (!wrapHorizontal) {
|
||||||
@ -4010,6 +4002,15 @@ function finishLoadingImage( image, callback, successful, jobid ){
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function numberOfTiles( drawer, level ){
|
||||||
|
|
||||||
|
if ( !drawer.cacheNumTiles[ level ] ) {
|
||||||
|
drawer.cacheNumTiles[ level ] = drawer.source.getNumTiles( level );
|
||||||
|
}
|
||||||
|
|
||||||
|
return drawer.cacheNumTiles[ level ];
|
||||||
|
};
|
||||||
|
|
||||||
}( OpenSeadragon ));
|
}( OpenSeadragon ));
|
||||||
|
|
||||||
(function( $ ){
|
(function( $ ){
|
||||||
|
@ -74,14 +74,6 @@ $.Drawer = function(source, viewport, elmt) {
|
|||||||
|
|
||||||
$.Drawer.prototype = {
|
$.Drawer.prototype = {
|
||||||
|
|
||||||
_getNumTiles: function(level) {
|
|
||||||
if (!this.cacheNumTiles[level]) {
|
|
||||||
this.cacheNumTiles[level] = this.source.getNumTiles(level);
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.cacheNumTiles[level];
|
|
||||||
},
|
|
||||||
|
|
||||||
_getPixelRatio: function(level) {
|
_getPixelRatio: function(level) {
|
||||||
if (!this.cachePixelRatios[level]) {
|
if (!this.cachePixelRatios[level]) {
|
||||||
this.cachePixelRatios[level] = this.source.getPixelRatio(level);
|
this.cachePixelRatios[level] = this.source.getPixelRatio(level);
|
||||||
@ -400,7 +392,7 @@ $.Drawer.prototype = {
|
|||||||
|
|
||||||
var tileTL = this.source.getTileAtPoint(level, viewportTL);
|
var tileTL = this.source.getTileAtPoint(level, viewportTL);
|
||||||
var tileBR = this.source.getTileAtPoint(level, viewportBR);
|
var tileBR = this.source.getTileAtPoint(level, viewportBR);
|
||||||
var numTiles = this._getNumTiles(level);
|
var numTiles = numberOfTiles( this, level );
|
||||||
var numTilesX = numTiles.x;
|
var numTilesX = numTiles.x;
|
||||||
var numTilesY = numTiles.y;
|
var numTilesY = numTiles.y;
|
||||||
if (!wrapHorizontal) {
|
if (!wrapHorizontal) {
|
||||||
@ -638,4 +630,13 @@ function finishLoadingImage( image, callback, successful, jobid ){
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function numberOfTiles( drawer, level ){
|
||||||
|
|
||||||
|
if ( !drawer.cacheNumTiles[ level ] ) {
|
||||||
|
drawer.cacheNumTiles[ level ] = drawer.source.getNumTiles( level );
|
||||||
|
}
|
||||||
|
|
||||||
|
return drawer.cacheNumTiles[ level ];
|
||||||
|
};
|
||||||
|
|
||||||
}( OpenSeadragon ));
|
}( OpenSeadragon ));
|
||||||
|
Loading…
Reference in New Issue
Block a user