aboutsummaryrefslogtreecommitdiff
path: root/js/tools/TranslateObject3DTool.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-04-04 11:17:50 -0700
committerNivesh Rajbhandari2012-04-04 11:17:50 -0700
commit8b60a68f0152c609ad94a931472680f313678d8d (patch)
treeb99be03e0f7293eb6c74ff6b25746c338f10d153 /js/tools/TranslateObject3DTool.js
parentb9032fb0f656a6c029ef0c71c490bb5d5cd10d94 (diff)
downloadninja-8b60a68f0152c609ad94a931472680f313678d8d.tar.gz
We should require VecUtils instead of referring to the global reference since we will eventually remove that from the window object.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools/TranslateObject3DTool.js')
-rwxr-xr-xjs/tools/TranslateObject3DTool.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/tools/TranslateObject3DTool.js b/js/tools/TranslateObject3DTool.js
index 7163f005..9fa49229 100755
--- a/js/tools/TranslateObject3DTool.js
+++ b/js/tools/TranslateObject3DTool.js
@@ -5,7 +5,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
5</copyright> */ 5</copyright> */
6 6
7var Translate3DToolBase = require("js/tools/Translate3DToolBase").Translate3DToolBase, 7var Translate3DToolBase = require("js/tools/Translate3DToolBase").Translate3DToolBase,
8 drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils, 8 vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils,
9 viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils, 9 viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils,
10 snapManager = require("js/helper-classes/3D/snap-manager").SnapManager; 10 snapManager = require("js/helper-classes/3D/snap-manager").SnapManager;
11 11
@@ -16,7 +16,7 @@ exports.TranslateObject3DTool = Object.create(Translate3DToolBase, {
16 initializeSnapping : { 16 initializeSnapping : {
17 value : function(event) 17 value : function(event)
18 { 18 {
19 console.log( "initializeSnapping" ); 19// console.log( "initializeSnapping" );
20 20
21 this._mouseDownHitRec = null; 21 this._mouseDownHitRec = null;
22 this._mouseUpHitRec = null; 22 this._mouseUpHitRec = null;
@@ -128,7 +128,7 @@ exports.TranslateObject3DTool = Object.create(Translate3DToolBase, {
128 128
129 // only do quadrant snapping if the 4 corners of the element are in the drag plane 129 // only do quadrant snapping if the 4 corners of the element are in the drag plane
130 130
131 var sign = MathUtils.fpSign( VecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0); 131 var sign = MathUtils.fpSign( vecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0);
132 this._shouldUseQuadPt = (sign == 0); 132 this._shouldUseQuadPt = (sign == 0);
133 133
134 var wpHitRec = hitRec.convertToWorkingPlane( this._dragPlane ); 134 var wpHitRec = hitRec.convertToWorkingPlane( this._dragPlane );