diff options
author | hwc487 | 2012-05-11 13:52:55 -0700 |
---|---|---|
committer | hwc487 | 2012-05-11 13:52:55 -0700 |
commit | 137bfc9d4c41cc918d969565bec28a834fe10472 (patch) | |
tree | e9fa109fc65218f45e386df48b713ff5858f3d62 /js/tools/drawing-tool-base.js | |
parent | d21aaca3d7093b6af968b7f9f764ab54e004f02b (diff) | |
parent | 27f4cacb39de1c2e3910748dadc9fc16d0655480 (diff) | |
download | ninja-137bfc9d4c41cc918d969565bec28a834fe10472.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts:
js/lib/geom/geom-obj.js
js/lib/geom/rectangle.js
js/tools/TagTool.js
Diffstat (limited to 'js/tools/drawing-tool-base.js')
-rwxr-xr-x | js/tools/drawing-tool-base.js | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/js/tools/drawing-tool-base.js b/js/tools/drawing-tool-base.js index 7d97f105..84641754 100755 --- a/js/tools/drawing-tool-base.js +++ b/js/tools/drawing-tool-base.js | |||
@@ -36,9 +36,8 @@ exports.DrawingToolBase = Montage.create(Montage, { | |||
36 | * 2 - Y value converted to screen point | 36 | * 2 - Y value converted to screen point |
37 | */ | 37 | */ |
38 | getInitialSnapPoint: { | 38 | getInitialSnapPoint: { |
39 | value: function(x, y, shapeCanvas) { | 39 | value: function(x, y, shapeCanvas) |
40 | snapManager.clearDragPlane(); | 40 | { |
41 | |||
42 | // update the snap settings | 41 | // update the snap settings |
43 | snapManager.enableSnapAlign( snapManager.snapAlignEnabledAppLevel() ); | 42 | snapManager.enableSnapAlign( snapManager.snapAlignEnabledAppLevel() ); |
44 | snapManager.enableElementSnap( snapManager.elementSnapEnabledAppLevel() ); | 43 | snapManager.enableElementSnap( snapManager.elementSnapEnabledAppLevel() ); |
@@ -446,30 +445,6 @@ exports.DrawingToolBase = Montage.create(Montage, { | |||
446 | }, | 445 | }, |
447 | 446 | ||
448 | /** | 447 | /** |
449 | * Get the matrix for the actual element being added to the user document. | ||
450 | */ | ||
451 | getElementMatrix: { | ||
452 | value: function(planeMat, midPt) { | ||
453 | var divMat, flatMat, flatMatSafe; | ||
454 | // calculate the matrix for the element. | ||
455 | // we should not need to worry about divide by zero below since we snapped to the point | ||
456 | divMat = planeMat.slice(0); | ||
457 | divMat[12] = 0.0; | ||
458 | divMat[13] = 0.0; | ||
459 | //divMat[14] = 0.0; | ||
460 | divMat[14] = midPt[2]; | ||
461 | |||
462 | // set the left and top of the element such that the center of the rectangle is at the mid point | ||
463 | viewUtils.setViewportObj(this.stage); | ||
464 | |||
465 | flatMat = divMat; | ||
466 | flatMatSafe = MathUtils.scientificToDecimal(flatMat, 10); | ||
467 | |||
468 | return "matrix3d(" + flatMatSafe + ")"; | ||
469 | } | ||
470 | }, | ||
471 | |||
472 | /** | ||
473 | * Draw Helper Functions | 448 | * Draw Helper Functions |
474 | */ | 449 | */ |
475 | 450 | ||