aboutsummaryrefslogtreecommitdiff
path: root/js/tools/drawing-tool-base.js
diff options
context:
space:
mode:
authorJohn Mayhew2012-07-24 15:46:16 -0700
committerJohn Mayhew2012-07-24 15:46:16 -0700
commit9f240b8b9b1f5fb0f145c343ca5e533e25e81374 (patch)
tree407564eaa6466e8d4cf2eeee0c56dc623243586f /js/tools/drawing-tool-base.js
parentd25359c75089215ee48838db081fd3d51cbbd85f (diff)
parent21d74af1e9fc57cc25cea8aa7408beabf79ff2f3 (diff)
downloadninja-9f240b8b9b1f5fb0f145c343ca5e533e25e81374.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja
Diffstat (limited to 'js/tools/drawing-tool-base.js')
-rwxr-xr-xjs/tools/drawing-tool-base.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/tools/drawing-tool-base.js b/js/tools/drawing-tool-base.js
index 92646894..cb094b85 100755
--- a/js/tools/drawing-tool-base.js
+++ b/js/tools/drawing-tool-base.js
@@ -300,7 +300,7 @@ exports.DrawingToolBase = Montage.create(Component, {
300 s1Offset[1] += snapManager.getStageHeight() / 2.0; 300 s1Offset[1] += snapManager.getStageHeight() / 2.0;
301 return ({ "width": w, "height": h, "planeMat": planeMat, "midPt": midPt, "mouseDownPos": s0Offset, "mouseUpPos": s1Offset }); 301 return ({ "width": w, "height": h, "planeMat": planeMat, "midPt": midPt, "mouseDownPos": s0Offset, "mouseUpPos": s1Offset });
302 } else { 302 } else {
303 return null 303 return null;
304 } 304 }
305 } 305 }
306 }, 306 },
@@ -516,7 +516,7 @@ exports.DrawingToolBase = Montage.create(Component, {
516 value: function( s0In, s1In, planeMat, planeMatInv, fixedS1 ) { 516 value: function( s0In, s1In, planeMat, planeMatInv, fixedS1 ) {
517 var s0 = s0In.slice(0); 517 var s0 = s0In.slice(0);
518 var s2 = s1In.slice(0); 518 var s2 = s1In.slice(0);
519 519 var pt0, pt1;
520 520
521 // calculate the mid point of the rectangle 521 // calculate the mid point of the rectangle
522 var midPt = vecUtils.vecAdd(3, s0, s2); 522 var midPt = vecUtils.vecAdd(3, s0, s2);
@@ -571,7 +571,8 @@ exports.DrawingToolBase = Montage.create(Component, {
571 { 571 {
572 p0 = ptArr[0]; p1 = ptArr[1]; p2 = ptArr[2]; p3 = ptArr[3]; 572 p0 = ptArr[0]; p1 = ptArr[1]; p2 = ptArr[2]; p3 = ptArr[3];
573 z = p0[2]; 573 z = p0[2];
574 var pt0 = p0.slice(0), pt1 = p2.slice(0); 574 pt0 = p0.slice(0);
575 pt1 = p2.slice(0);
575 if (p0[0] < p2[0]){ 576 if (p0[0] < p2[0]){
576 pt0[0] = Math.max(p0[0],p1[0]); 577 pt0[0] = Math.max(p0[0],p1[0]);
577 pt1[0] = Math.min(p2[0],p3[0]); 578 pt1[0] = Math.min(p2[0],p3[0]);