mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
Merge pull request #56 from acdha/dzitilesource-relative-paths
DziTileSource: avoid changing relative paths
This commit is contained in:
commit
da35f3b39f
@ -109,18 +109,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (url && !options.tilesUrl) {
|
if (url && !options.tilesUrl) {
|
||||||
if( 'http' !== url.substring( 0, 4 ) ){
|
options.tilesUrl = url.replace(/([^\/]+)\.dzi$/, '$1_files/');
|
||||||
host = location.protocol + '//' + location.host;
|
|
||||||
}
|
|
||||||
dziPath = url.split('/');
|
|
||||||
dziName = dziPath.pop();
|
|
||||||
dziName = dziName.substring(0, dziName.lastIndexOf('.'));
|
|
||||||
dziPath = '/' + dziPath.join('/') + '/' + dziName + '_files/';
|
|
||||||
tilesUrl = dziPath;
|
|
||||||
if( host ){
|
|
||||||
tilesUrl = host + tilesUrl;
|
|
||||||
}
|
|
||||||
options.tilesUrl = tilesUrl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
|
Loading…
Reference in New Issue
Block a user