Fix issue that rectangle can't move to clicked destination on navigator.

This issue can reproduce by these steps.
1. Open http://localhost:8000/test/demo/coordinates.html
2. Click Rotate button
3. Click canvas of navigator
This commit is contained in:
Hiroaki ENDOH 2015-12-26 00:41:40 +09:00
parent 3524386543
commit fb222d9fe9

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.pointFromPixel( event.position ).rotate( -this.viewer.viewport.degrees, this.viewer.viewport.getHomeBounds().getCenter() ) );
this.viewer.viewport.panTo( this.viewport.pointFromPixelNoRotate( event.position ).rotate( -this.viewer.viewport.degrees, this.viewer.viewport.getHomeBounds().getCenter() ) );
this.viewer.viewport.applyConstraints();
}
}