From d694c7ea6ca81c24a74a6bbd88dbddfc71501c70 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Mon, 5 Jan 2015 13:17:05 -0800 Subject: [PATCH 1/5] Version bump --- changelog.txt | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 5485d015..4e71760e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,7 @@ OPENSEADRAGON CHANGELOG ======================= -1.2.0: (in progress) +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 486d8743..6aa039fe 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", From 8ff70dd54fee5b4ebe212311f599a7fecfd14514 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Mon, 5 Jan 2015 13:21:19 -0800 Subject: [PATCH 2/5] Started 1.2.1 --- changelog.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.txt b/changelog.txt index 4e71760e..779df7b5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,8 @@ OPENSEADRAGON CHANGELOG ======================= +1.2.1: (in progress) + 1.2.0: * New combined IIIF TileSource for 1.0 through 2.0 (#441) From 9e07c96d29407f38108e9ee424bfc9eb37d5bec0 Mon Sep 17 00:00:00 2001 From: Younes El Alami Date: Fri, 9 Jan 2015 02:21:16 +0000 Subject: [PATCH 3/5] Added preserveOverlays option to Viewer --- src/openseadragon.js | 7 +++++++ src/viewer.js | 15 ++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index f8b744de..e1a37e2f 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -519,6 +519,12 @@ * 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 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] * 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. @@ -945,6 +951,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 39ed6294..32a18722 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -539,9 +539,13 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, this.navigator.close(); } - this.clearOverlays(); + if( ! this.preserveOverlays) + { + this.clearOverlays(); + this.overlaysContainer.innerHTML = ""; + } + this.drawersContainer.innerHTML = ""; - this.overlaysContainer.innerHTML = ""; if ( this.drawer ) { this.drawer.destroy(); @@ -1968,7 +1972,12 @@ function openTileSource( viewer, source ) { _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({ viewer: _this, From 1d16b01a2863ef1268f093b09c082b4f8ab91687 Mon Sep 17 00:00:00 2001 From: Younes El Alami Date: Sat, 10 Jan 2015 12:11:45 +0000 Subject: [PATCH 4/5] Changed _this.source.overlays to _this.overlays, https://github.com/openseadragon/openseadragon/pull/561/files#r22730318 --- src/viewer.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index 32a18722..a359a9d9 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1973,12 +1973,11 @@ function openTileSource( viewer, source ) { } if( _this.preserveOverlays ){ - _this.source.overlays = _this.currentOverlays; - } - else{ - _this.source.overlays = _this.source.overlays || []; + _this.overlays = _this.currentOverlays; } + _this.source.overlays = _this.source.overlays || []; + _this.drawer = new $.Drawer({ viewer: _this, source: _this.source, From 7b6f7d6a5b35ec2ff9dc0b5ed116e2c21c35e8c1 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Mon, 12 Jan 2015 13:40:33 -0800 Subject: [PATCH 5/5] Changelog for #561 --- changelog.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.txt b/changelog.txt index 779df7b5..f9a8cda9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,8 @@ OPENSEADRAGON CHANGELOG 1.2.1: (in progress) +* Added preserveOverlays option (#561) + 1.2.0: * New combined IIIF TileSource for 1.0 through 2.0 (#441)