mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-23 21:56:10 +03:00
Compare commits
No commits in common. "a27b511ad3d974c75e54399ff6417f4b978bda00" and "165aaebd4c681af4ff3b15db7cb5b9c8c0c218a1" have entirely different histories.
a27b511ad3
...
165aaebd4c
@ -20,7 +20,6 @@ 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)
|
|
||||||
|
|
||||||
3.0.0:
|
3.0.0:
|
||||||
|
|
||||||
|
@ -3289,6 +3289,9 @@ 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 );
|
||||||
@ -3300,9 +3303,6 @@ 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 ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user