mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-27 15:46:10 +03:00
Compare commits
3 Commits
165aaebd4c
...
a27b511ad3
Author | SHA1 | Date | |
---|---|---|---|
|
a27b511ad3 | ||
|
f3f20fd30d | ||
|
f1865c3878 |
@ -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)
|
* 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,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 ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user