Merge pull request #1199 from altert/master

additional change to tilesUrl regex
This commit is contained in:
Ian Gilman 2017-05-19 09:51:56 -07:00 committed by GitHub
commit 063b05bd3d
2 changed files with 4 additions and 1 deletions

View File

@ -140,7 +140,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
if (url && !options.tilesUrl) {
options.tilesUrl = url.replace(
/([^\/]+?)(\.(dzi|xml|js))?(\?[^\/]*)?\/?$/, '$1_files/');
/([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/, '$1_files/');
if (url.search(/\.(dzi|xml|js)\?/) != -1) {
options.queryParams = url.match(/\?.*/);

View File

@ -36,6 +36,9 @@
testImplicitTilesUrl(
'/iiipsrv?DeepZoom=/path/my.dzi', '/iiipsrv?DeepZoom=/path/my_files/',
'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');
});
}());