aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-08 17:32:57 -0700
committerValerio Virgillito2012-05-08 17:32:57 -0700
commitdd7a68b7c35c19932760e5cae87fd1d232a4cff1 (patch)
tree9f2962e16881a608251e067c85eb3a60109a7384 /js/tools
parentcb9e4b68b307f3bbc898fd482eb2668120cd4d18 (diff)
parentd220c02e246b30509b28a47fa04916ca2b8122e4 (diff)
downloadninja-dd7a68b7c35c19932760e5cae87fd1d232a4cff1.tar.gz
Merge branch 'refs/heads/master' into dom-architecture
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/SelectionTool.js2
-rwxr-xr-xjs/tools/TranslateObject3DTool.js9
-rwxr-xr-xjs/tools/drawing-tool-base.js5
3 files changed, 8 insertions, 8 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js
index d3e4ebf9..5c8b15ae 100755
--- a/js/tools/SelectionTool.js
+++ b/js/tools/SelectionTool.js
@@ -505,7 +505,7 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
505 delta = vecUtils.vecSubtract( 3, data.pt1, data.pt0 ); 505 delta = vecUtils.vecSubtract( 3, data.pt1, data.pt0 );
506 delta[0] = ~~delta[0]; 506 delta[0] = ~~delta[0];
507 delta[1] = ~~delta[1]; 507 delta[1] = ~~delta[1];
508 delta[2] = 0; 508 //delta[2] = 0;
509 var transMat = Matrix.Translation( delta ); 509 var transMat = Matrix.Translation( delta );
510 this._moveElements(transMat); 510 this._moveElements(transMat);
511 } 511 }
diff --git a/js/tools/TranslateObject3DTool.js b/js/tools/TranslateObject3DTool.js
index b4f55bd9..f8b32d23 100755
--- a/js/tools/TranslateObject3DTool.js
+++ b/js/tools/TranslateObject3DTool.js
@@ -54,10 +54,10 @@ exports.TranslateObject3DTool = Montage.create(Translate3DToolBase, {
54 else 54 else
55 { 55 {
56 this._delta = null; 56 this._delta = null;
57 // special case for z-translation 57 //if(this._handleMode === 2)
58 if(this._handleMode === 2)
59 { 58 {
60 this._dragPlane = viewUtils.getNormalToUnprojectedElementPlane(this._target); 59 this._dragPlane = viewUtils.getNormalToUnprojectedElementPlane(this._target, this._handleMode, this._inLocalMode);
60 //console.log( "dragPlane: " + this._dragPlane );
61 snapManager.setupDragPlaneFromPlane(this._dragPlane); 61 snapManager.setupDragPlaneFromPlane(this._dragPlane);
62 do3DSnap = false; 62 do3DSnap = false;
63 63
@@ -86,7 +86,8 @@ exports.TranslateObject3DTool = Montage.create(Translate3DToolBase, {
86 var elt = this.application.ninja.stage.getElement(event, true); 86 var elt = this.application.ninja.stage.getElement(event, true);
87 if(elt && (elt !== hitRec.getElement())) 87 if(elt && (elt !== hitRec.getElement()))
88 { 88 {
89 hitRec = snapManager.findHitRecordForElement(elt); 89 var otherSnap = snapManager.findHitRecordForElement(elt);
90 if (otherSnap) hitRec = otherSnap;
90 } 91 }
91 if(elt === this.application.ninja.currentSelectedContainer) 92 if(elt === this.application.ninja.currentSelectedContainer)
92 { 93 {
diff --git a/js/tools/drawing-tool-base.js b/js/tools/drawing-tool-base.js
index 376b3a27..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() );