Refactor to reflect the reviewer comments

See also:
https://github.com/openseadragon/openseadragon/pull/807#discussion_r48447403
This commit is contained in:
Hiroaki ENDOH 2015-12-27 12:15:17 +09:00
parent fb222d9fe9
commit 27c91204b6

View File

@ -372,7 +372,7 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /*
*/
function onCanvasClick( event ) {
if ( event.quick && this.viewer.viewport ) {
this.viewer.viewport.panTo( this.viewport.pointFromPixelNoRotate( event.position ).rotate( -this.viewer.viewport.degrees, this.viewer.viewport.getHomeBounds().getCenter() ) );
this.viewer.viewport.panTo(this.viewport.pointFromPixel(event.position));
this.viewer.viewport.applyConstraints();
}
}