0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-22 01:07:56 +01:00

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

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]);