aboutsummaryrefslogtreecommitdiff
path: root/js/tools/SelectionTool.js
diff options
context:
space:
mode:
authorKruti Shah2012-06-22 10:00:53 -0700
committerKruti Shah2012-06-22 10:00:53 -0700
commit4bf8e4cdc179c3b388fc06f26008808aa4b77eb0 (patch)
tree743ea0d3a3af9cae65d5af531a6dba1951b03b33 /js/tools/SelectionTool.js
parentcb9fbfeba90b5b76d3f3f2b9303129ca4651e5be (diff)
parent020ad879a627c4234a8732f05e175ad69cedf180 (diff)
downloadninja-4bf8e4cdc179c3b388fc06f26008808aa4b77eb0.tar.gz
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'js/tools/SelectionTool.js')
-rwxr-xr-xjs/tools/SelectionTool.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js
index 9bd885a4..a0d5bc26 100755
--- a/js/tools/SelectionTool.js
+++ b/js/tools/SelectionTool.js
@@ -47,6 +47,20 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
47 } 47 }
48 }, 48 },
49 49
50 _areElementsIn2D : {
51 value: function () {
52 if(this.application.ninja.selectedElements.length) {
53 var len = this.application.ninja.selectedElements.length;
54 for(var i = 0; i < len; i++) {
55 if(!MathUtils.isIdentityMatrix(this.application.ninja.selectedElements[i].elementModel.getProperty("mat"))) {
56 return false;
57 }
58 }
59 }
60 return true;
61 }
62 },
63
50 startDraw: { 64 startDraw: {
51 value: function(event) { 65 value: function(event) {
52 this.drawData = null; 66 this.drawData = null;
@@ -70,7 +84,8 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
70 if(this._canSnap) 84 if(this._canSnap)
71 { 85 {
72 this.initializeSnapping(event); 86 this.initializeSnapping(event);
73 this._use3DMode = !this._areElementsOnSamePlane(); 87// this._use3DMode = !this._areElementsOnSamePlane();
88 this._use3DMode = !this._areElementsIn2D();
74// console.log("use3DMode = " + this._use3DMode); 89// console.log("use3DMode = " + this._use3DMode);
75 } 90 }
76 else 91 else