Fix bounds calculation of paths with coords >|9999|.

This commit is contained in:
Wouter R 2014-02-02 02:43:33 +01:00
parent 98d836b321
commit 2427856be9
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ function endShape() {
}
function getBounds(points) {
var xMin=9999,xMax=-9999,yMin=9999,yMax=-9999;
var xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity;
for (var i=0; i<points.length; i++) {
var p = points[i];
xMin = Math.min(xMin,p[0]);