mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-19 17:21:50 +03:00
Revert "Merge pull request #2059 from kim-sanghoon/fix/getLevelScale"
This reverts commit 1454ac791a0a2d538a58678374b7829f7c3f1fbb, reversing changes made to fcca75c57e9707be8a552bb824c8b6f5f899ee75.
This commit is contained in:
parent
b3196a9756
commit
91793ce752
@ -284,14 +284,10 @@ $.TileSource.prototype = {
|
||||
// see https://github.com/openseadragon/openseadragon/issues/22
|
||||
// we use the tilesources implementation of getLevelScale to generate
|
||||
// a memoized re-implementation
|
||||
var maxLevel = Math.ceil(
|
||||
Math.log( Math.max( this.dimensions.x, this.dimensions.y ) ) /
|
||||
Math.log( 2 )
|
||||
),
|
||||
levelScaleCache = {},
|
||||
var levelScaleCache = {},
|
||||
i;
|
||||
for( i = 0; i <= maxLevel; i++ ){
|
||||
levelScaleCache[ i ] = 1 / Math.pow(2, maxLevel - i);
|
||||
for( i = 0; i <= this.maxLevel; i++ ){
|
||||
levelScaleCache[ i ] = 1 / Math.pow(2, this.maxLevel - i);
|
||||
}
|
||||
this.getLevelScale = function( _level ){
|
||||
return levelScaleCache[ _level ];
|
||||
|
Loading…
x
Reference in New Issue
Block a user