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