Merge branch 'openseadragon:master' into master

This commit is contained in:
Aiosa 2022-06-07 14:48:33 +02:00 committed by GitHub
commit 1d99a2d6be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 12 deletions

View File

@ -8,7 +8,7 @@ OPENSEADRAGON CHANGELOG
* Added isFullScreen method to Viewer (#2067 @JachiOnuoha) * 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) * 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) * 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) * 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) * Fixed: Setting useCanvas to false would break the viewer (#2116 @rvv-bouvet)
* Allow silencing multi-image warnings on viewport coordinate conversion functions (#2120 @claycoleman) * Allow silencing multi-image warnings on viewport coordinate conversion functions (#2120 @claycoleman)
@ -20,6 +20,8 @@ OPENSEADRAGON CHANGELOG
* Now if you pass an error handler into makeAjaxRequest, it doesn't report errors into the console (#2142 @Aiosa) * 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) * 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) * 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: 3.0.0:

8
package-lock.json generated
View File

@ -295,7 +295,7 @@
"array-each": { "array-each": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", "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 "dev": true
}, },
"array-slice": { "array-slice": {
@ -1908,9 +1908,9 @@
"dev": true "dev": true
}, },
"grunt": { "grunt": {
"version": "1.5.2", "version": "1.5.3",
"resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.2.tgz", "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz",
"integrity": "sha512-XCtfaIu72OyDqK24MjWiGC9SwlkuhkS1mrULr1xzuJ2XqAFhP3ZAchZGHJeSCY6mkaOXU4F7SbmmCF7xIVoC9w==", "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"dateformat": "~3.0.3", "dateformat": "~3.0.3",

View File

@ -272,9 +272,11 @@
*/ */
_freeupCanvasMemory: function () { _freeupCanvasMemory: function () {
for (var i = 0; i < this.levels.length; i++) { for (var i = 0; i < this.levels.length; i++) {
if(this.levels[i].context2D){
this.levels[i].context2D.canvas.height = 0; this.levels[i].context2D.canvas.height = 0;
this.levels[i].context2D.canvas.width = 0; this.levels[i].context2D.canvas.width = 0;
} }
}
}, },
}); });

View File

@ -2319,7 +2319,7 @@ function OpenSeadragon( options ){
* @param {Function} options.success - a function to call on a successful response * @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 {Function} options.error - a function to call on when an error occurs
* @param {Object} options.headers - headers to add to the AJAX request * @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, * @param {String} options.postData - HTTP POST data (usually but not necessarily in k=v&k2=v2... form,
* see TileSource::getPostData), GET method used if null * see TileSource::getPostData), GET method used if null
* @param {Boolean} [options.withCredentials=false] - whether to set the XHR's withCredentials * @param {Boolean} [options.withCredentials=false] - whether to set the XHR's withCredentials

View File

@ -230,7 +230,7 @@ $.Rect.prototype = {
* Returns the width and height component as a vector OpenSeadragon.Point * Returns the width and height component as a vector OpenSeadragon.Point
* @function * @function
* @returns {OpenSeadragon.Point} The 2 dimensional vector representing the * @returns {OpenSeadragon.Point} The 2 dimensional vector representing the
* the width and height of the rectangle. * width and height of the rectangle.
*/ */
getSize: function() { getSize: function() {
return new $.Point(this.width, this.height); return new $.Point(this.width, this.height);

View File

@ -3289,9 +3289,6 @@ function onCanvasPinch( event ) {
if ( gestureSettings.pinchToZoom && if ( gestureSettings.pinchToZoom &&
(!canvasPinchEventArgs.preventDefaultPanAction || !canvasPinchEventArgs.preventDefaultZoomAction) ) { (!canvasPinchEventArgs.preventDefaultPanAction || !canvasPinchEventArgs.preventDefaultZoomAction) ) {
centerPt = this.viewport.pointFromPixel( event.center, true ); centerPt = this.viewport.pointFromPixel( event.center, true );
if ( !canvasPinchEventArgs.preventDefaultZoomAction ) {
this.viewport.zoomBy( event.distance / event.lastDistance, centerPt, true );
}
if ( gestureSettings.zoomToRefPoint && !canvasPinchEventArgs.preventDefaultPanAction ) { if ( gestureSettings.zoomToRefPoint && !canvasPinchEventArgs.preventDefaultPanAction ) {
lastCenterPt = this.viewport.pointFromPixel( event.lastCenter, true ); lastCenterPt = this.viewport.pointFromPixel( event.lastCenter, true );
panByPt = lastCenterPt.minus( centerPt ); panByPt = lastCenterPt.minus( centerPt );
@ -3303,6 +3300,9 @@ function onCanvasPinch( event ) {
} }
this.viewport.panBy(panByPt, true); this.viewport.panBy(panByPt, true);
} }
if ( !canvasPinchEventArgs.preventDefaultZoomAction ) {
this.viewport.zoomBy( event.distance / event.lastDistance, centerPt, true );
}
this.viewport.applyConstraints(); this.viewport.applyConstraints();
} }
if ( gestureSettings.pinchRotate && !canvasPinchEventArgs.preventDefaultRotateAction ) { if ( gestureSettings.pinchRotate && !canvasPinchEventArgs.preventDefaultRotateAction ) {