From 8f1385d4aa12173fb4d9af695b8e5036f675b621 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 4 May 2012 14:39:33 -0700 Subject: Fixing selection and layout code to exclude SCRIPT and STYLE tags. Signed-off-by: Nivesh Rajbhandari --- js/tools/SelectionTool.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/tools/SelectionTool.js') diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js index 855c7b8c..d3e4ebf9 100755 --- a/js/tools/SelectionTool.js +++ b/js/tools/SelectionTool.js @@ -165,10 +165,11 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { box[3] = point.y; //selectionManagerModule.selectionManager.marqueeSelection(box); - var childNodes = this.application.ninja.currentDocument.documentRoot.childNodes; + var childNodes = this.application.ninja.currentDocument.documentRoot.childNodes, + selectionController = this.application.ninja.selectionController; childNodes = Array.prototype.slice.call(childNodes, 0); childNodes.forEach(function(item) { - if(item.nodeType == 1 && SelectionTool._complicatedCollisionDetection(item, box)) { + if(selectionController.isNodeTraversable(item) && SelectionTool._complicatedCollisionDetection(item, box)) { selectedItems.push(item); } }); -- cgit v1.2.3