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:
parent
98d836b321
commit
2427856be9
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user