mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-19 16:23:13 +03:00
Merge branch 'master' into ig-loading
This commit is contained in:
commit
326e7f3e36
@ -39,6 +39,9 @@ OPENSEADRAGON CHANGELOG
|
|||||||
* Fixed: zoomTo/zoomBy ignore refPoint if immediately is true (#1184)
|
* Fixed: zoomTo/zoomBy ignore refPoint if immediately is true (#1184)
|
||||||
* Enabled configuration of ImageLoader timeout (#1192)
|
* Enabled configuration of ImageLoader timeout (#1192)
|
||||||
* Viewer.open() now supports an initialPage argument for sequenceMode (#1196)
|
* Viewer.open() now supports an initialPage argument for sequenceMode (#1196)
|
||||||
|
* Fixed: IIPImageServer didn't work with the latest OSD release (#1199)
|
||||||
|
* Now clamping pixel ratio density to a minimum of 1, fixing display issues on low density devices (#1200)
|
||||||
|
* Improved calculation for determining which level to load first (#1198)
|
||||||
|
|
||||||
2.2.1:
|
2.2.1:
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
|
|||||||
|
|
||||||
if (url && !options.tilesUrl) {
|
if (url && !options.tilesUrl) {
|
||||||
options.tilesUrl = url.replace(
|
options.tilesUrl = url.replace(
|
||||||
/([^\/]+?)(\.(dzi|xml|js))?(\?[^\/]*)?\/?$/, '$1_files/');
|
/([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/, '$1_files/');
|
||||||
|
|
||||||
if (url.search(/\.(dzi|xml|js)\?/) != -1) {
|
if (url.search(/\.(dzi|xml|js)\?/) != -1) {
|
||||||
options.queryParams = url.match(/\?.*/);
|
options.queryParams = url.match(/\?.*/);
|
||||||
|
@ -875,7 +875,8 @@ function OpenSeadragon( options ){
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A ratio comparing the device screen's pixel density to the canvas's backing store pixel density. Defaults to 1 if canvas isn't supported by the browser.
|
* A ratio comparing the device screen's pixel density to the canvas's backing store pixel density,
|
||||||
|
* clamped to a minimum of 1. Defaults to 1 if canvas isn't supported by the browser.
|
||||||
* @member {Number} pixelDensityRatio
|
* @member {Number} pixelDensityRatio
|
||||||
* @memberof OpenSeadragon
|
* @memberof OpenSeadragon
|
||||||
*/
|
*/
|
||||||
@ -888,7 +889,7 @@ function OpenSeadragon( options ){
|
|||||||
context.msBackingStorePixelRatio ||
|
context.msBackingStorePixelRatio ||
|
||||||
context.oBackingStorePixelRatio ||
|
context.oBackingStorePixelRatio ||
|
||||||
context.backingStorePixelRatio || 1;
|
context.backingStorePixelRatio || 1;
|
||||||
return devicePixelRatio / backingStoreRatio;
|
return Math.max(devicePixelRatio, 1) / backingStoreRatio;
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -980,7 +980,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
|||||||
var targetZeroRatio = viewport.deltaPixelsFromPointsNoRotate(
|
var targetZeroRatio = viewport.deltaPixelsFromPointsNoRotate(
|
||||||
this.source.getPixelRatio(
|
this.source.getPixelRatio(
|
||||||
Math.max(
|
Math.max(
|
||||||
this.source.getClosestLevel(viewport.containerSize) - 1,
|
this.source.getClosestLevel(),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
@ -320,25 +320,20 @@ $.TileSource.prototype = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @function
|
* @function
|
||||||
* @param {Rect} rect
|
* @returns {Number} The highest level in this tile source that can be contained in a single tile.
|
||||||
*/
|
*/
|
||||||
getClosestLevel: function( rect ) {
|
getClosestLevel: function() {
|
||||||
var i,
|
var i,
|
||||||
tilesPerSide,
|
|
||||||
tiles;
|
tiles;
|
||||||
|
|
||||||
for( i = this.minLevel; i < this.maxLevel; i++ ){
|
for (i = this.minLevel + 1; i <= this.maxLevel; i++){
|
||||||
tiles = this.getNumTiles( i );
|
tiles = this.getNumTiles(i);
|
||||||
tilesPerSide = new $.Point(
|
if (tiles.x > 1 || tiles.y > 1) {
|
||||||
Math.floor( rect.x / this.getTileWidth(i) ),
|
|
||||||
Math.floor( rect.y / this.getTileHeight(i) )
|
|
||||||
);
|
|
||||||
|
|
||||||
if( tiles.x + 1 >= tilesPerSide.x && tiles.y + 1 >= tilesPerSide.y ){
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Math.max( 0, i - 1 );
|
|
||||||
|
return i - 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
testImplicitTilesUrl(
|
testImplicitTilesUrl(
|
||||||
'/iiipsrv?DeepZoom=/path/my.dzi', '/iiipsrv?DeepZoom=/path/my_files/',
|
'/iiipsrv?DeepZoom=/path/my.dzi', '/iiipsrv?DeepZoom=/path/my_files/',
|
||||||
'querystring in dzi url should not be ignored before slashes');
|
'querystring in dzi url should not be ignored before slashes');
|
||||||
|
testImplicitTilesUrl(
|
||||||
|
'/fcg-bin/iipsrv.fcgi?Deepzoom=123test.tif.dzi', '/fcg-bin/iipsrv.fcgi?Deepzoom=123test.tif_files/',
|
||||||
|
'filename in querystring does not have to contain slash');
|
||||||
});
|
});
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user