mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 08:36: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,22 +1153,25 @@ function openTileSource( viewer, source ) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//Instantiate a navigator if configured
|
//Instantiate a navigator if configured
|
||||||
if ( _this.showNavigator && ! _this.navigator && !_this.collectionMode ){
|
if ( _this.showNavigator && !_this.collectionMode ){
|
||||||
_this.navigator = new $.Navigator({
|
// Note: By passing the fully parsed source, the navigator doesn't
|
||||||
id: _this.navigatorId,
|
// have to load it again.
|
||||||
position: _this.navigatorPosition,
|
if ( _this.navigator ) {
|
||||||
sizeRatio: _this.navigatorSizeRatio,
|
_this.navigator.open( source );
|
||||||
height: _this.navigatorHeight,
|
} else {
|
||||||
width: _this.navigatorWidth,
|
_this.navigator = new $.Navigator({
|
||||||
// By passing the fully parsed source here, the navigator doesn't
|
id: _this.navigatorId,
|
||||||
// have to load it again. Additionally, we don't have to call
|
position: _this.navigatorPosition,
|
||||||
// navigator.open, as it's implicitly called in the ctor.
|
sizeRatio: _this.navigatorSizeRatio,
|
||||||
tileSources: source,
|
height: _this.navigatorHeight,
|
||||||
tileHost: _this.tileHost,
|
width: _this.navigatorWidth,
|
||||||
prefixUrl: _this.prefixUrl,
|
tileSources: source,
|
||||||
overlays: _this.overlays,
|
tileHost: _this.tileHost,
|
||||||
viewer: _this
|
prefixUrl: _this.prefixUrl,
|
||||||
});
|
overlays: _this.overlays,
|
||||||
|
viewer: _this
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Instantiate a referencestrip if configured
|
//Instantiate a referencestrip if configured
|
||||||
|
Loading…
Reference in New Issue
Block a user