Minor preserveOverlays cleanup

This commit is contained in:
Ian Gilman 2015-02-13 13:26:44 -08:00
parent 384e0d4782
commit f118ae9407
2 changed files with 11 additions and 7 deletions

View File

@ -517,17 +517,19 @@
* If sequenceMode is true, display this page initially. * If sequenceMode is true, display this page initially.
* *
* @property {Boolean} [preserveViewport=false] * @property {Boolean} [preserveViewport=false]
* If sequenceMode is true, then normally navigating to through each image resets the * If sequenceMode is true, then normally navigating through each image resets the
* viewport to 'home' position. If preserveViewport is set to true, then the viewport * viewport to 'home' position. If preserveViewport is set to true, then the viewport
* position is preserved when navigating between images in the sequence. * position is preserved when navigating between images in the sequence.
* *
* @property {Boolean} [preserveOverlays=false] * @property {Boolean} [preserveOverlays=false]
* If sequenceMode is true, then normally navigating to through each image * If sequenceMode is true, then normally navigating through each image
* resets the overlays. * resets the overlays.
* If preserveOverlays is set to true, then the overlays * If preserveOverlays is set to true, then the overlays added with {@link OpenSeadragon.Viewer#addOverlay}
* are preserved when navigating between images in the sequence. * are preserved when navigating between images in the sequence.
* Note: setting preserveOverlays overrides any overlays specified in the * Note: setting preserveOverlays overrides any overlays specified in the global
* "overlays" property. * "overlays" option for the Viewer. It's also not compatible with specifying
* per-tileSource overlays via the options, as those overlays will persist
* even after the tileSource is closed.
* *
* @property {Boolean} [showReferenceStrip=false] * @property {Boolean} [showReferenceStrip=false]
* If sequenceMode is true, then display a scrolling strip of image thumbnails for * If sequenceMode is true, then display a scrolling strip of image thumbnails for

View File

@ -666,8 +666,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
this.navigator.close(); this.navigator.close();
} }
if( ! this.preserveOverlays) if( ! this.preserveOverlays) {
{
this.clearOverlays(); this.clearOverlays();
this.overlaysContainer.innerHTML = ""; this.overlaysContainer.innerHTML = "";
} }
@ -712,6 +711,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
this.close(); this.close();
this.clearOverlays();
this.overlaysContainer.innerHTML = "";
//TODO: implement this... //TODO: implement this...
//this.unbindSequenceControls() //this.unbindSequenceControls()
//this.unbindStandardControls() //this.unbindStandardControls()