custom tile source should pass whole object to constructor to allow idiomatic pattern of extension of tile source with arbitrary properties

This commit is contained in:
thatcher 2012-08-29 20:53:42 -04:00
parent ddedd35db9
commit 1d1cbc6f56
2 changed files with 2 additions and 9 deletions

View File

@ -6,7 +6,7 @@
PROJECT: openseadragon
BUILD_MAJOR: 0
BUILD_MINOR: 9
BUILD_ID: 66
BUILD_ID: 67
BUILD: ${PROJECT}.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}
VERSION: ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}

View File

@ -305,14 +305,7 @@ $.extend( $.Viewer.prototype, $.EventHandler.prototype, $.ControlDock.prototype,
} else if ( $.isPlainObject( tileSource ) ){
if( $.isFunction( tileSource.getTileUrl ) ){
//Custom tile source
customTileSource = new $.TileSource(
tileSource.width,
tileSource.height,
tileSource.tileSize,
tileSource.tileOverlap,
tileSource.minLevel,
tileSource.maxLevel
);
customTileSource = new $.TileSource(tileSource);
customTileSource.getTileUrl = tileSource.getTileUrl;
_this.open( customTileSource );
} else {