From 1700e2f060e42fcd9355d55fceeb4a8ed5bc6032 Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Thu, 5 May 2022 20:43:38 +0800 Subject: [PATCH 1/7] Fix duplicated word: "the the" From https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ProofreadPage/+/789330 --- src/openseadragon.js | 2 +- src/rectangle.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index 4cdb0d2b..b6aa0454 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -2319,7 +2319,7 @@ function OpenSeadragon( options ){ * @param {Function} options.success - a function to call on a successful response * @param {Function} options.error - a function to call on when an error occurs * @param {Object} options.headers - headers to add to the AJAX request - * @param {String} options.responseType - the response type of the the AJAX request + * @param {String} options.responseType - the response type of the AJAX request * @param {String} options.postData - HTTP POST data (usually but not necessarily in k=v&k2=v2... form, * see TileSrouce::getPostData), GET method used if null * @param {Boolean} [options.withCredentials=false] - whether to set the XHR's withCredentials diff --git a/src/rectangle.js b/src/rectangle.js index 8f255506..3ef381dc 100644 --- a/src/rectangle.js +++ b/src/rectangle.js @@ -230,7 +230,7 @@ $.Rect.prototype = { * Returns the width and height component as a vector OpenSeadragon.Point * @function * @returns {OpenSeadragon.Point} The 2 dimensional vector representing the - * the width and height of the rectangle. + * width and height of the rectangle. */ getSize: function() { return new $.Point(this.width, this.height); From 165aaebd4c681af4ff3b15db7cb5b9c8c0c218a1 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Tue, 10 May 2022 13:51:58 -0700 Subject: [PATCH 2/7] Changelog for #2155 --- changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index a7082d6f..62347fa6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -8,7 +8,7 @@ OPENSEADRAGON CHANGELOG * Added isFullScreen method to Viewer (#2067 @JachiOnuoha) * Fixed an issue where turning off panVertical or panHorizontal would not affect the panning keyboard combos (#2069 @JachiOnuoha) * Cleaned up console.logs so that errors and warnings use console.error and console.warn as appropriate (#2073 @Abhishek-90) -* Improved documentation (#2067 @JachiOnuoha, #2112 @shyamkumaryadav, #2152 @joedf) +* Improved documentation (#2067 @JachiOnuoha, #2112 @shyamkumaryadav, #2152 @joedf, #2155 @samwilson) * Added option to include POST data when loading files via Ajax (#2072 @Aiosa) * Fixed: Setting useCanvas to false would break the viewer (#2116 @rvv-bouvet) * Allow silencing multi-image warnings on viewport coordinate conversion functions (#2120 @claycoleman) From f1865c3878e199425720a1df6936ee249a45bd7c Mon Sep 17 00:00:00 2001 From: Christophe Avenel Date: Thu, 12 May 2022 10:45:47 +0200 Subject: [PATCH 3/7] Fix wrong center point on touch zoom When doing pinch to zoom, we need to do pan first and then zoom, so that the center point is correct. Otherwise, the pan will computed on the unzoomed coordinates, giving an impression of zooming toward the center --- src/viewer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index ab779142..d33a4a26 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -3289,9 +3289,6 @@ function onCanvasPinch( event ) { if ( gestureSettings.pinchToZoom && (!canvasPinchEventArgs.preventDefaultPanAction || !canvasPinchEventArgs.preventDefaultZoomAction) ) { centerPt = this.viewport.pointFromPixel( event.center, true ); - if ( !canvasPinchEventArgs.preventDefaultZoomAction ) { - this.viewport.zoomBy( event.distance / event.lastDistance, centerPt, true ); - } if ( gestureSettings.zoomToRefPoint && !canvasPinchEventArgs.preventDefaultPanAction ) { lastCenterPt = this.viewport.pointFromPixel( event.lastCenter, true ); panByPt = lastCenterPt.minus( centerPt ); @@ -3303,6 +3300,9 @@ function onCanvasPinch( event ) { } this.viewport.panBy(panByPt, true); } + if ( !canvasPinchEventArgs.preventDefaultZoomAction ) { + this.viewport.zoomBy( event.distance / event.lastDistance, centerPt, true ); + } this.viewport.applyConstraints(); } if ( gestureSettings.pinchRotate && !canvasPinchEventArgs.preventDefaultRotateAction ) { From a27b511ad3d974c75e54399ff6417f4b978bda00 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Thu, 12 May 2022 13:55:42 -0700 Subject: [PATCH 4/7] Changelog for #2158 --- changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.txt b/changelog.txt index 62347fa6..4984de27 100644 --- a/changelog.txt +++ b/changelog.txt @@ -20,6 +20,7 @@ OPENSEADRAGON CHANGELOG * Now if you pass an error handler into makeAjaxRequest, it doesn't report errors into the console (#2142 @Aiosa) * Fixed error caused by attaching MouseTracker to the page's document element (#2145 @tdiprima) * Added fallback and deprecation warning for Viewer.buttons (which got changed to buttonGroup in 3.0.0) (#2153 @devbyjonah) +* Pinch to zoom now zooms around the center of the pinch, rather than the center of the viewer (#2158 @cavenel) 3.0.0: From af26fdbff1f630fbd4dd6933880ef5b14249e997 Mon Sep 17 00:00:00 2001 From: pearcetm Date: Wed, 18 May 2022 12:26:19 -0400 Subject: [PATCH 5/7] Bugfix for imagetilesource _freeupCanvasMemory --- src/imagetilesource.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/imagetilesource.js b/src/imagetilesource.js index cbea1ef0..6d49bbd3 100644 --- a/src/imagetilesource.js +++ b/src/imagetilesource.js @@ -272,8 +272,10 @@ */ _freeupCanvasMemory: function () { for (var i = 0; i < this.levels.length; i++) { - this.levels[i].context2D.canvas.height = 0; - this.levels[i].context2D.canvas.width = 0; + if(this.levels[i].context2D){ + this.levels[i].context2D.canvas.height = 0; + this.levels[i].context2D.canvas.width = 0; + } } }, }); From 995be3c37cb762e92521f2b7af58cb55b1e992fa Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Wed, 18 May 2022 15:39:02 -0700 Subject: [PATCH 6/7] Changelog for #2162 --- changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.txt b/changelog.txt index 4984de27..8e53e930 100644 --- a/changelog.txt +++ b/changelog.txt @@ -21,6 +21,7 @@ OPENSEADRAGON CHANGELOG * Fixed error caused by attaching MouseTracker to the page's document element (#2145 @tdiprima) * Added fallback and deprecation warning for Viewer.buttons (which got changed to buttonGroup in 3.0.0) (#2153 @devbyjonah) * Pinch to zoom now zooms around the center of the pinch, rather than the center of the viewer (#2158 @cavenel) +* Fixed an issue that would sometimes cause problems with freeing up ImageTileSource memory (#2162 @pearcetm) 3.0.0: From e15c65ac098b18fd29d7808f5e1778483f5392e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 00:12:47 +0000 Subject: [PATCH 7/7] Bump grunt from 1.5.2 to 1.5.3 Bumps [grunt](https://github.com/gruntjs/grunt) from 1.5.2 to 1.5.3. - [Release notes](https://github.com/gruntjs/grunt/releases) - [Changelog](https://github.com/gruntjs/grunt/blob/main/CHANGELOG) - [Commits](https://github.com/gruntjs/grunt/compare/v1.5.2...v1.5.3) --- updated-dependencies: - dependency-name: grunt dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b65a2524..b43d15bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -295,7 +295,7 @@ "array-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", "dev": true }, "array-slice": { @@ -1908,9 +1908,9 @@ "dev": true }, "grunt": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.2.tgz", - "integrity": "sha512-XCtfaIu72OyDqK24MjWiGC9SwlkuhkS1mrULr1xzuJ2XqAFhP3ZAchZGHJeSCY6mkaOXU4F7SbmmCF7xIVoC9w==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", + "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", "dev": true, "requires": { "dateformat": "~3.0.3",