aboutsummaryrefslogtreecommitdiff
path: root/js/tools/modifier-tool-base.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-24 00:24:20 -0700
committerValerio Virgillito2012-07-24 00:24:20 -0700
commit55a69aeb3c66b533d5a2d27d7548471c2c8b5dfc (patch)
tree365b393741e1fd34a3a4da68285cb1e9faa45e09 /js/tools/modifier-tool-base.js
parente711a4ffaa87dc368908020d57053cf82eba6f39 (diff)
downloadninja-55a69aeb3c66b533d5a2d27d7548471c2c8b5dfc.tar.gz
jshint cleanup on the tools directory
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/tools/modifier-tool-base.js')
-rwxr-xr-xjs/tools/modifier-tool-base.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js
index d12ba7d2..18a08b5a 100755
--- a/js/tools/modifier-tool-base.js
+++ b/js/tools/modifier-tool-base.js
@@ -200,7 +200,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, {
200 200
201 // only do quadrant snapping if the 4 corners of the element are in the drag plane 201 // only do quadrant snapping if the 4 corners of the element are in the drag plane
202 var sign = MathUtils.fpSign( vecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0); 202 var sign = MathUtils.fpSign( vecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0);
203 this._shouldUseQuadPt = (sign == 0) 203 this._shouldUseQuadPt = (sign === 0);
204 204
205 var wpHitRec = hitRec.convertToWorkingPlane( this._dragPlane ); 205 var wpHitRec = hitRec.convertToWorkingPlane( this._dragPlane );
206 this._mouseDownHitRec = wpHitRec; 206 this._mouseDownHitRec = wpHitRec;
@@ -252,10 +252,12 @@ exports.ModifierToolBase = Montage.create(DrawingTool, {
252 y0 = bounds[0][1], y1 = bounds[1][1]; 252 y0 = bounds[0][1], y1 = bounds[1][1];
253 var dx = x1 - x0, dy = y1 - y0; 253 var dx = x1 - x0, dy = y1 - y0;
254 var u = 0, v = 0; 254 var u = 0, v = 0;
255 if (MathUtils.fpSign(dx) != 0) 255 if (MathUtils.fpSign(dx) !== 0) {
256 u = (scrPt[0] - x0) / dx; 256 u = (scrPt[0] - x0) / dx;
257 if (MathUtils.fpSign(dy) != 0) 257 }
258 if (MathUtils.fpSign(dy) !== 0) {
258 v = (scrPt[1] - y0) / dy; 259 v = (scrPt[1] - y0) / dy;
260 }
259 261
260 paramPt[0] = u; 262 paramPt[0] = u;
261 paramPt[1] = v; 263 paramPt[1] = v;