mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
Navigator now updates properly when reopening a viewer
Before, if you closed a viewer and then opened a new tilesource into it, the navigator would still have the old tilesource. This patch fixes that.
This commit is contained in:
parent
c6a38dd802
commit
e99c126a85
@ -1153,16 +1153,18 @@ function openTileSource( viewer, source ) {
|
||||
});
|
||||
|
||||
//Instantiate a navigator if configured
|
||||
if ( _this.showNavigator && ! _this.navigator && !_this.collectionMode ){
|
||||
if ( _this.showNavigator && !_this.collectionMode ){
|
||||
// Note: By passing the fully parsed source, the navigator doesn't
|
||||
// have to load it again.
|
||||
if ( _this.navigator ) {
|
||||
_this.navigator.open( source );
|
||||
} else {
|
||||
_this.navigator = new $.Navigator({
|
||||
id: _this.navigatorId,
|
||||
position: _this.navigatorPosition,
|
||||
sizeRatio: _this.navigatorSizeRatio,
|
||||
height: _this.navigatorHeight,
|
||||
width: _this.navigatorWidth,
|
||||
// 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,
|
||||
prefixUrl: _this.prefixUrl,
|
||||
@ -1170,6 +1172,7 @@ function openTileSource( viewer, source ) {
|
||||
viewer: _this
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//Instantiate a referencestrip if configured
|
||||
if ( _this.showReferenceStrip && !_this.referenceStrip ){
|
||||
|
Loading…
Reference in New Issue
Block a user