aboutsummaryrefslogtreecommitdiff
path: root/js/stage/tool-handle.js
diff options
context:
space:
mode:
authorKris Kowal2012-07-06 11:53:10 -0700
committerKris Kowal2012-07-06 15:01:48 -0700
commit04343eda8c2f870b0da55cfdc8003c99fe1cc4de (patch)
tree0a6048889b65bb16ff58822e55bc1346e9eb07bd /js/stage/tool-handle.js
parent648ee61ae84216d0236e0dbc211addc13b2cfa3a (diff)
downloadninja-04343eda8c2f870b0da55cfdc8003c99fe1cc4de.tar.gz
Remove trailing spaces
Diffstat (limited to 'js/stage/tool-handle.js')
-rwxr-xr-xjs/stage/tool-handle.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/js/stage/tool-handle.js b/js/stage/tool-handle.js
index e5b0a22f..ecd16951 100755
--- a/js/stage/tool-handle.js
+++ b/js/stage/tool-handle.js
@@ -111,7 +111,7 @@ var ToolHandle = exports.ToolHandle = Montage.create(Component, {
111 return true; 111 return true;
112 } 112 }
113 } 113 }
114 114
115}); 115});
116 116
117 117
@@ -302,7 +302,7 @@ exports.RotateHandle = Montage.create(ToolHandle, {
302 this._planeEq[3] = -vecUtils.vecDot(3, this._planeEq, this._origin); 302 this._planeEq[3] = -vecUtils.vecDot(3, this._planeEq, this._origin);
303 303
304 this._dirVecL = MathUtils.transformPoint(this._dirVec, this._matL); 304 this._dirVecL = MathUtils.transformPoint(this._dirVec, this._matL);
305 305
306 context.beginPath(); 306 context.beginPath();
307 307
308 var pt = [this._radius, 0.0, 0.0]; 308 var pt = [this._radius, 0.0, 0.0];
@@ -322,7 +322,7 @@ exports.RotateHandle = Montage.create(ToolHandle, {
322 322
323 // Draw the transform handle 323 // Draw the transform handle
324 context.beginPath(); 324 context.beginPath();
325 325
326 pt = [this._transformCenterRadius, 0.0, 0.0]; 326 pt = [this._transformCenterRadius, 0.0, 0.0];
327 327
328 for (var i=0; i<this._nTriangles; i++) 328 for (var i=0; i<this._nTriangles; i++)
@@ -336,7 +336,7 @@ exports.RotateHandle = Montage.create(ToolHandle, {
336 context.stroke(); 336 context.stroke();
337 337
338 338
339 339
340 context.restore(); 340 context.restore();
341 } 341 }
342 }, 342 },
@@ -384,7 +384,7 @@ exports.RotateHandle = Montage.create(ToolHandle, {
384 384
385 return 0; 385 return 0;
386 } 386 }
387 387
388 localPt = MathUtils.transformPoint(localPt, this._matL); 388 localPt = MathUtils.transformPoint(localPt, this._matL);
389 389
390 var theta = Math.atan2(localPt[1], localPt[0]); 390 var theta = Math.atan2(localPt[1], localPt[0]);
@@ -398,13 +398,13 @@ exports.RotateHandle = Montage.create(ToolHandle, {
398 { 398 {
399 return 1; 399 return 1;
400 } 400 }
401 401
402 xC = this._radius*Math.cos(theta); 402 xC = this._radius*Math.cos(theta);
403 yC = this._radius*Math.sin(theta); 403 yC = this._radius*Math.sin(theta);
404 ptOnCircle = [xC, yC, 0]; 404 ptOnCircle = [xC, yC, 0];
405 405
406 dist = vecUtils.vecDist( 2, localPt, ptOnCircle ); 406 dist = vecUtils.vecDist( 2, localPt, ptOnCircle );
407 407
408 if ( dist <= 5 ) 408 if ( dist <= 5 )
409 { 409 {
410 return 2; 410 return 2;
@@ -414,7 +414,7 @@ exports.RotateHandle = Montage.create(ToolHandle, {
414 } 414 }
415 }, 415 },
416 416
417 417
418 drawShadedAngle: { 418 drawShadedAngle: {
419 value: function(angle, localPt) { 419 value: function(angle, localPt) {
420 420
@@ -448,7 +448,7 @@ exports.RotateHandle = Montage.create(ToolHandle, {
448 } 448 }
449 449
450 context.lineTo(this._origin[0], this._origin[1]); 450 context.lineTo(this._origin[0], this._origin[1]);
451 451
452 context.stroke(); 452 context.stroke();
453 context.fill(); 453 context.fill();
454 454
@@ -675,7 +675,7 @@ exports.TranslateHandle = Montage.create(ToolHandle, {
675 context.stroke(); 675 context.stroke();
676 676
677 this._drawArrowHead(this._origin, this._endPt, context); 677 this._drawArrowHead(this._origin, this._endPt, context);
678 678
679 context.restore(); 679 context.restore();
680 } 680 }
681 }, 681 },
@@ -734,10 +734,10 @@ exports.TranslateHandle = Montage.create(ToolHandle, {
734 context.restore(); 734 context.restore();
735 } 735 }
736 }, 736 },
737 737
738 collidesWithPoint: 738 collidesWithPoint:
739 { 739 {
740 value:function (x, y) 740 value:function (x, y)
741 { 741 {
742 var globalPt = [x, y, this._origin[2]]; 742 var globalPt = [x, y, this._origin[2]];
743 743
@@ -750,7 +750,7 @@ exports.TranslateHandle = Montage.create(ToolHandle, {
750 { 750 {
751 return 0; 751 return 0;
752 } 752 }
753 753
754 var t = MathUtils.parameterizePointOnLine2D( this._origin, this._dirVec, nearPt ); 754 var t = MathUtils.parameterizePointOnLine2D( this._origin, this._dirVec, nearPt );
755 dist = vecUtils.vecDist( 2, globalPt, nearPt ); 755 dist = vecUtils.vecDist( 2, globalPt, nearPt );
756 if (dist <= 5) 756 if (dist <= 5)