Check that zoom reference point is valid before using it

This commit is contained in:
Jonathan Nielsen 2013-10-04 10:12:47 -06:00
parent d88ce4a970
commit fd85ee4f4e

View File

@ -551,7 +551,9 @@ $.Viewport.prototype = {
*/
zoomTo: function( zoom, refPoint, immediately ) {
this.zoomPoint = refPoint instanceof $.Point ?
this.zoomPoint = refPoint instanceof $.Point &&
!isNaN(refPoint.x) &&
!isNaN(refPoint.y) ?
refPoint :
null;