mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
fixed IIIF options.maxLevel
This commit is contained in:
parent
01408a4744
commit
8e06e5eb39
@ -127,7 +127,8 @@ $.IIIFTileSource = function( options ){
|
|||||||
if (!this.scale_factors) {
|
if (!this.scale_factors) {
|
||||||
options.maxLevel = Number(Math.ceil(Math.log(Math.max(this.width, this.height), 2)));
|
options.maxLevel = Number(Math.ceil(Math.log(Math.max(this.width, this.height), 2)));
|
||||||
} else {
|
} else {
|
||||||
options.maxLevel = Math.floor(Math.pow(Math.max.apply(null, this.scale_factors), 0.5));
|
var maxScaleFactor = Math.max.apply(null, this.scale_factors);
|
||||||
|
options.maxLevel = Math.round(Math.log(maxScaleFactor) * Math.LOG2E);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user