mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-26 07:06:10 +03:00
Added preserveOverlays option to Viewer
This commit is contained in:
parent
8ff70dd54f
commit
9e07c96d29
@ -519,6 +519,12 @@
|
|||||||
* position. If preserveViewport is set to true, then the viewport position
|
* position. If preserveViewport is set to true, then the viewport position
|
||||||
* is preserved when navigating between images in the sequence.
|
* is preserved when navigating between images in the sequence.
|
||||||
*
|
*
|
||||||
|
* @property {Boolean} [preserveOverlays=false]
|
||||||
|
* If the viewer has been configured with a sequence of tile sources, then
|
||||||
|
* normally navigating to through each image resets the overlays.
|
||||||
|
* If preserveOverlays is set to true, then the overlays
|
||||||
|
* are preserved when navigating between images in the sequence.
|
||||||
|
*
|
||||||
* @property {Boolean} [showReferenceStrip=false]
|
* @property {Boolean} [showReferenceStrip=false]
|
||||||
* If the viewer has been configured with a sequence of tile sources, then
|
* If the viewer has been configured with a sequence of tile sources, then
|
||||||
* display a scrolling strip of image thumbnails for navigating through the images.
|
* display a scrolling strip of image thumbnails for navigating through the images.
|
||||||
@ -945,6 +951,7 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
|||||||
showSequenceControl: true, //SEQUENCE
|
showSequenceControl: true, //SEQUENCE
|
||||||
sequenceControlAnchor: null, //SEQUENCE
|
sequenceControlAnchor: null, //SEQUENCE
|
||||||
preserveViewport: false, //SEQUENCE
|
preserveViewport: false, //SEQUENCE
|
||||||
|
preserveOverlays: false, //SEQUENCE
|
||||||
navPrevNextWrap: false, //SEQUENCE
|
navPrevNextWrap: false, //SEQUENCE
|
||||||
showNavigationControl: true, //ZOOM/HOME/FULL/ROTATION
|
showNavigationControl: true, //ZOOM/HOME/FULL/ROTATION
|
||||||
navigationControlAnchor: null, //ZOOM/HOME/FULL/ROTATION
|
navigationControlAnchor: null, //ZOOM/HOME/FULL/ROTATION
|
||||||
|
@ -539,9 +539,13 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
this.navigator.close();
|
this.navigator.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearOverlays();
|
if( ! this.preserveOverlays)
|
||||||
|
{
|
||||||
|
this.clearOverlays();
|
||||||
|
this.overlaysContainer.innerHTML = "";
|
||||||
|
}
|
||||||
|
|
||||||
this.drawersContainer.innerHTML = "";
|
this.drawersContainer.innerHTML = "";
|
||||||
this.overlaysContainer.innerHTML = "";
|
|
||||||
|
|
||||||
if ( this.drawer ) {
|
if ( this.drawer ) {
|
||||||
this.drawer.destroy();
|
this.drawer.destroy();
|
||||||
@ -1968,7 +1972,12 @@ function openTileSource( viewer, source ) {
|
|||||||
_this.viewport.resetContentSize( _this.source.dimensions );
|
_this.viewport.resetContentSize( _this.source.dimensions );
|
||||||
}
|
}
|
||||||
|
|
||||||
_this.source.overlays = _this.source.overlays || [];
|
if( _this.preserveOverlays ){
|
||||||
|
_this.source.overlays = _this.currentOverlays;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
_this.source.overlays = _this.source.overlays || [];
|
||||||
|
}
|
||||||
|
|
||||||
_this.drawer = new $.Drawer({
|
_this.drawer = new $.Drawer({
|
||||||
viewer: _this,
|
viewer: _this,
|
||||||
|
Loading…
Reference in New Issue
Block a user