mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
navigator to request maxLevel tileSize
This commit is contained in:
parent
984fb8c531
commit
69bf069038
@ -298,12 +298,9 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /*
|
|||||||
open: function( source ) {
|
open: function( source ) {
|
||||||
this.updateSize();
|
this.updateSize();
|
||||||
var containerSize = this.viewer.viewport.containerSize.times( this.sizeRatio );
|
var containerSize = this.viewer.viewport.containerSize.times( this.sizeRatio );
|
||||||
if( source.tileSize > containerSize.x ||
|
var ts = source.getTileSize(source.maxLevel);
|
||||||
source.tileSize > containerSize.y ){
|
if ( ts > containerSize.x || ts > containerSize.y ) {
|
||||||
this.minPixelRatio = Math.min(
|
this.minPixelRatio = Math.min( containerSize.x, containerSize.y ) / ts;
|
||||||
containerSize.x,
|
|
||||||
containerSize.y
|
|
||||||
) / source.tileSize;
|
|
||||||
} else {
|
} else {
|
||||||
this.minPixelRatio = this.viewer.minPixelRatio;
|
this.minPixelRatio = this.viewer.minPixelRatio;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user