Merge pull request #115 from Ventero/navigatortilesource

Don't load the tile source again when creating a navigator.
This commit is contained in:
iangilman 2013-05-30 09:22:57 -07:00
commit 481cbef2bf

View File

@ -1147,7 +1147,10 @@ function openTileSource( viewer, source ) {
sizeRatio: _this.navigatorSizeRatio, sizeRatio: _this.navigatorSizeRatio,
height: _this.navigatorHeight, height: _this.navigatorHeight,
width: _this.navigatorWidth, width: _this.navigatorWidth,
tileSources: _this.tileSources, // By passing the fully parsed source here, the navigator doesn't
// have to load it again. Additionally, we don't have to call
// navigator.open, as it's implicitly called in the ctor.
tileSources: source,
tileHost: _this.tileHost, tileHost: _this.tileHost,
prefixUrl: _this.prefixUrl, prefixUrl: _this.prefixUrl,
overlays: _this.overlays, overlays: _this.overlays,
@ -1212,10 +1215,6 @@ function openTileSource( viewer, source ) {
} }
VIEWERS[ _this.hash ] = _this; VIEWERS[ _this.hash ] = _this;
if( _this.navigator ){
_this.navigator.open( source );
}
_this.raiseEvent( 'open', { source: source, viewer: _this } ); _this.raiseEvent( 'open', { source: source, viewer: _this } );
return _this; return _this;