diff --git a/changelog.txt b/changelog.txt index 6f707cbb..27874980 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,7 @@ OPENSEADRAGON CHANGELOG ======================= -2.0.0: (in progress) +1.3.0: (in progress) * True multi-image mode (#450) * BREAKING CHANGE: Passing an array for the tileSources option is no longer enough to trigger sequence mode; you have to set the sequenceMode option to true as well @@ -41,7 +41,12 @@ OPENSEADRAGON CHANGELOG * imageLoaderLimit now works (#544) * Turning off scrollToZoom in gestureSettings now allows scroll events to propagate -1.2.0: (in progress) +1.2.1: (in progress) + +* Added preserveOverlays option (#561) +* Fixed: DZI tilesource was broken (#563) + +1.2.0: * New combined IIIF TileSource for 1.0 through 2.0 (#441) * BREAKING CHANGE: Removed IIIF1_1TileSource (now that IIIFTileSource supports all versions) diff --git a/package.json b/package.json index 2b102600..97fb8b25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "OpenSeadragon", - "version": "1.1.1", + "version": "1.2.0", "description": "Provides a smooth, zoomable user interface for HTML/Javascript.", "devDependencies": { "grunt": "^0.4.5", diff --git a/src/openseadragon.js b/src/openseadragon.js index 07abcd42..c85c6012 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -517,6 +517,14 @@ * viewport to 'home' position. If preserveViewport is set to true, then the viewport * position is preserved when navigating between images in the sequence. * + * @property {Boolean} [preserveOverlays=false] + * If sequenceMode is true, 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. + * Note: setting preserveOverlays overrides any overlays specified in the + * "overlays" property. + * * @property {Boolean} [showReferenceStrip=false] * If sequenceMode is true, then display a scrolling strip of image thumbnails for * navigating through the images. @@ -952,6 +960,7 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){ showSequenceControl: true, //SEQUENCE sequenceControlAnchor: null, //SEQUENCE preserveViewport: false, //SEQUENCE + preserveOverlays: false, //SEQUENCE navPrevNextWrap: false, //SEQUENCE showNavigationControl: true, //ZOOM/HOME/FULL/ROTATION navigationControlAnchor: null, //ZOOM/HOME/FULL/ROTATION diff --git a/src/viewer.js b/src/viewer.js index b3350306..ca8a0780 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -622,8 +622,10 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, } // Global overlays - for ( var i = 0; i < _this.overlays.length; i++ ) { - _this.currentOverlays[ i ] = getOverlayObject( _this, _this.overlays[ i ] ); + if( _this.overlays && !_this.preserveOverlays ){ + for ( var i = 0; i < _this.overlays.length; i++ ) { + _this.currentOverlays[ i ] = getOverlayObject( _this, _this.overlays[ i ] ); + } } _this._drawOverlays(); @@ -734,8 +736,11 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, this.navigator.close(); } - this.clearOverlays(); - this.overlaysContainer.innerHTML = ""; + if( ! this.preserveOverlays) + { + this.clearOverlays(); + this.overlaysContainer.innerHTML = ""; + } THIS[ this.hash ].animating = false; this.world.removeAll();