diff options
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/RotateStage3DTool.js | 18 | ||||
-rwxr-xr-x | js/tools/SelectionTool.js | 5 |
2 files changed, 4 insertions, 19 deletions
diff --git a/js/tools/RotateStage3DTool.js b/js/tools/RotateStage3DTool.js index 2a9c63db..90cbe95e 100755 --- a/js/tools/RotateStage3DTool.js +++ b/js/tools/RotateStage3DTool.js | |||
@@ -96,12 +96,6 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { | |||
96 | viewUtils.pushViewportObj( stage ); | 96 | viewUtils.pushViewportObj( stage ); |
97 | var eltCtr = viewUtils.getCenterOfProjection(); | 97 | var eltCtr = viewUtils.getCenterOfProjection(); |
98 | viewUtils.popViewportObj(); | 98 | viewUtils.popViewportObj(); |
99 | // if(this.application.ninja.documentController.webTemplate) | ||
100 | if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") | ||
101 | { | ||
102 | eltCtr[0] = stage.scrollWidth/2; | ||
103 | eltCtr[1] = stage.scrollHeight/2; | ||
104 | } | ||
105 | 99 | ||
106 | var curMat = viewUtils.getMatrixFromElement(stage); | 100 | var curMat = viewUtils.getMatrixFromElement(stage); |
107 | var curMatInv = glmat4.inverse(curMat, []); | 101 | var curMatInv = glmat4.inverse(curMat, []); |
@@ -118,17 +112,7 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { | |||
118 | } | 112 | } |
119 | 113 | ||
120 | this._origin = viewUtils.localToGlobal(eltCtr, stage); | 114 | this._origin = viewUtils.localToGlobal(eltCtr, stage); |
121 | 115 | this._setTransformOrigin(false); | |
122 | // if(this.application.ninja.documentController.webTemplate) | ||
123 | if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") | ||
124 | { | ||
125 | this._startOriginArray = []; | ||
126 | this._startOriginArray.push(this._origin.slice()); | ||
127 | } | ||
128 | else | ||
129 | { | ||
130 | this._setTransformOrigin(false); | ||
131 | } | ||
132 | this.DrawHandles(); | 116 | this.DrawHandles(); |
133 | } | 117 | } |
134 | }, | 118 | }, |
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, { | |||
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.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 | }); |