mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Applied touch rotate fix suggested in #2319
This commit is contained in:
parent
292b62ba21
commit
84d2dcf11d
@ -3422,7 +3422,8 @@ function onCanvasPinch( event ) {
|
||||
event.gesturePoints[0].currentPos.x - event.gesturePoints[1].currentPos.x);
|
||||
var angle2 = Math.atan2(event.gesturePoints[0].lastPos.y - event.gesturePoints[1].lastPos.y,
|
||||
event.gesturePoints[0].lastPos.x - event.gesturePoints[1].lastPos.x);
|
||||
this.viewport.setRotation(this.viewport.getRotation() + ((angle1 - angle2) * (180 / Math.PI)));
|
||||
centerPt = this.viewport.pointFromPixel( event.center, true );
|
||||
this.viewport.rotateTo(this.viewport.getRotation(true) + ((angle1 - angle2) * (180 / Math.PI)), centerPt, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user