From 40a4d9dbc12e802e2d0a7c3acd69bc7e394d4529 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Fri, 27 Apr 2012 10:03:58 -0700 Subject: Fix for 1525 Pen: "Uncaught RangeError: Maximum call stack size exceeded". (check if the second mouse click actually selects the existing first anchor point) --- js/helper-classes/3D/math-utils.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'js/helper-classes') diff --git a/js/helper-classes/3D/math-utils.js b/js/helper-classes/3D/math-utils.js index 2f0283a9..35ee8112 100755 --- a/js/helper-classes/3D/math-utils.js +++ b/js/helper-classes/3D/math-utils.js @@ -928,17 +928,18 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, { return 0; } //TODO testing...remove this block - console.log("getAxisAngleBetween3DVectors Angle: "+angle); if (isNaN(angle)){ - console.log("getAxisAngleBetween3DVectors Angle is NaN"); + console.log("Warning! getAxisAngleBetween3DVectors Angle is NaN"); } //TODO end testing block //optionally, if axis is provided, create the axis of rotation as well var rotAxis = VecUtils.vecCross(3, v1n, v2n); rotAxis = VecUtils.vecNormalize(3, rotAxis, 1); - axis[0] = rotAxis[0]; - axis[1] = rotAxis[1]; - axis[2] = rotAxis[2]; + if (axis){ + axis[0] = rotAxis[0]; + axis[1] = rotAxis[1]; + axis[2] = rotAxis[2]; + } return angle; } }, -- cgit v1.2.3