diff options
author | Kruti Shah | 2012-05-31 10:44:45 -0700 |
---|---|---|
committer | Kruti Shah | 2012-05-31 10:44:45 -0700 |
commit | c350cc1c060fdf17357ddadce024267943784593 (patch) | |
tree | 453f86e88f1ee1dfda6fb4b7cc7b17e306e39536 /js/tools/SelectionTool.js | |
parent | fdc4f5c7f81ae3b9adeca2232e60268b4be594a2 (diff) | |
parent | 121d0e616f48aa7cd048763554089c20a1883d7a (diff) | |
download | ninja-c350cc1c060fdf17357ddadce024267943784593.tar.gz |
Merge branch 'refs/heads/TimelineUberjd' into TimelineUber
Conflicts:
js/panels/Timeline/Layer.reel/Layer.js
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/tools/SelectionTool.js')
-rwxr-xr-x | js/tools/SelectionTool.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js index 07c26b8c..4bafa12a 100755 --- a/js/tools/SelectionTool.js +++ b/js/tools/SelectionTool.js | |||
@@ -165,10 +165,11 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
165 | box[3] = point.y; | 165 | box[3] = point.y; |
166 | 166 | ||
167 | //selectionManagerModule.selectionManager.marqueeSelection(box); | 167 | //selectionManagerModule.selectionManager.marqueeSelection(box); |
168 | var childNodes = this.application.ninja.currentDocument.documentRoot.childNodes; | 168 | var childNodes = this.application.ninja.currentDocument.model.documentRoot.childNodes, |
169 | selectionController = this.application.ninja.selectionController; | ||
169 | childNodes = Array.prototype.slice.call(childNodes, 0); | 170 | childNodes = Array.prototype.slice.call(childNodes, 0); |
170 | childNodes.forEach(function(item) { | 171 | childNodes.forEach(function(item) { |
171 | if(item.nodeType == 1 && SelectionTool._complicatedCollisionDetection(item, box)) { | 172 | if(selectionController.isNodeTraversable(item) && SelectionTool._complicatedCollisionDetection(item, box)) { |
172 | selectedItems.push(item); | 173 | selectedItems.push(item); |
173 | } | 174 | } |
174 | }); | 175 | }); |
@@ -223,7 +224,7 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
223 | if(this.application.ninja.selectedElements.length > 0) { | 224 | if(this.application.ninja.selectedElements.length > 0) { |
224 | this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]; | 225 | this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]; |
225 | } else { | 226 | } else { |
226 | this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; | 227 | this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.model.documentRoot; |
227 | } | 228 | } |
228 | } | 229 | } |
229 | }, | 230 | }, |
@@ -689,7 +690,7 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
689 | this.application.ninja.stage.clearDrawingCanvas(); | 690 | this.application.ninja.stage.clearDrawingCanvas(); |
690 | 691 | ||
691 | var item = this._target; | 692 | var item = this._target; |
692 | if(!item || (item === this.application.ninja.currentDocument.documentRoot)) | 693 | if(!item || (item === this.application.ninja.currentDocument.model.documentRoot)) |
693 | { | 694 | { |
694 | return; | 695 | return; |
695 | } | 696 | } |