diff options
author | Armen Kesablyan | 2012-06-21 14:36:32 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-21 14:36:32 -0700 |
commit | d9f9a65226dfe26500e82061cc38a7dda302f720 (patch) | |
tree | 32ae4d83164e71f83bf60eaaf0969d80a4d1e8b4 /js/tools | |
parent | 1830a7cf4150087ee12711ea75f1162e6e3c2934 (diff) | |
parent | 9fe9bc495af74d963fa7061d4d1a479720133a56 (diff) | |
download | ninja-d9f9a65226dfe26500e82061cc38a7dda302f720.tar.gz |
Merge branch 'refs/heads/master' into binding
Conflicts:
js/components/hintable.reel/hintable.js
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/SelectionTool.js | 17 |
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 |