aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-11 17:03:16 -0700
committerValerio Virgillito2012-06-11 17:03:16 -0700
commit6854a72504f57903bd5de003e377f2aefb02d0da (patch)
tree5dff803d67722595418e69f6cce9ec8a1a616f2f /js/tools
parent756cbfad2b98b300af8db3793aa21718b88dd950 (diff)
parentf4ad120c1a0d8594b8741eb1b07fdbd4fefcadeb (diff)
downloadninja-6854a72504f57903bd5de003e377f2aefb02d0da.tar.gz
Merge pull request #288 from mencio/dom-container
Dom container - Fixing the current selected container
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/Rotate3DToolBase.js2
-rwxr-xr-xjs/tools/SelectionTool.js4
-rwxr-xr-xjs/tools/ShapeTool.js6
-rwxr-xr-xjs/tools/TranslateObject3DTool.js2
4 files changed, 7 insertions, 7 deletions
diff --git a/js/tools/Rotate3DToolBase.js b/js/tools/Rotate3DToolBase.js
index bf9537dd..f0fe83fa 100755
--- a/js/tools/Rotate3DToolBase.js
+++ b/js/tools/Rotate3DToolBase.js
@@ -98,7 +98,7 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, {
98// { 98// {
99// hitRec = snapManager.findHitRecordForElement(elt); 99// hitRec = snapManager.findHitRecordForElement(elt);
100// } 100// }
101// if(elt === this.application.ninja.currentSelectedContainer) 101// if(elt === this.application.ninja.currentDocument.model.domContainer)
102// { 102// {
103// this._clickedOnStage = true; 103// this._clickedOnStage = true;
104// } 104// }
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js
index ed92b893..493f4aa2 100755
--- a/js/tools/SelectionTool.js
+++ b/js/tools/SelectionTool.js
@@ -224,9 +224,9 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
224 HandleDoubleClick: { 224 HandleDoubleClick: {
225 value: function(event) { 225 value: function(event) {
226 if(this.application.ninja.selectedElements.length > 0) { 226 if(this.application.ninja.selectedElements.length > 0) {
227 this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]; 227 this.application.ninja.currentDocument.model.domContainer = this.application.ninja.selectedElements[0];
228 } else { 228 } else {
229 this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.model.documentRoot; 229 this.application.ninja.currentDocument.model.domContainer = this.application.ninja.currentDocument.model.documentRoot;
230 } 230 }
231 } 231 }
232 }, 232 },
diff --git a/js/tools/ShapeTool.js b/js/tools/ShapeTool.js
index 03ddc391..8d381711 100755
--- a/js/tools/ShapeTool.js
+++ b/js/tools/ShapeTool.js
@@ -103,8 +103,8 @@ exports.ShapeTool = Montage.create(DrawingTool, {
103 if(wasSelected) { 103 if(wasSelected) {
104 this.AddCustomFeedback(); 104 this.AddCustomFeedback();
105 this.application.ninja.elementMediator.addDelegate = this; 105 this.application.ninja.elementMediator.addDelegate = this;
106 if(this.application.ninja.currentSelectedContainer.nodeName === "CANVAS") { 106 if(this.application.ninja.currentDocument.model.domContainer.nodeName === "CANVAS") {
107 this._targetedElement = this.application.ninja.currentSelectedContainer; 107 this._targetedElement = this.application.ninja.currentDocument.model.domContainer;
108 } 108 }
109 } else { 109 } else {
110 this.RemoveCustomFeedback(); 110 this.RemoveCustomFeedback();
@@ -199,7 +199,7 @@ exports.ShapeTool = Montage.create(DrawingTool, {
199 target = this._targetedElement; 199 target = this._targetedElement;
200 else 200 else
201 { 201 {
202 var container = this.application.ninja.currentSelectedContainer; 202 var container = this.application.ninja.currentDocument.model.domContainer;
203 if (container && (container.nodeName === "CANVAS")) 203 if (container && (container.nodeName === "CANVAS"))
204 { 204 {
205 target = container; 205 target = container;
diff --git a/js/tools/TranslateObject3DTool.js b/js/tools/TranslateObject3DTool.js
index f8b32d23..d9e558a4 100755
--- a/js/tools/TranslateObject3DTool.js
+++ b/js/tools/TranslateObject3DTool.js
@@ -89,7 +89,7 @@ exports.TranslateObject3DTool = Montage.create(Translate3DToolBase, {
89 var otherSnap = snapManager.findHitRecordForElement(elt); 89 var otherSnap = snapManager.findHitRecordForElement(elt);
90 if (otherSnap) hitRec = otherSnap; 90 if (otherSnap) hitRec = otherSnap;
91 } 91 }
92 if(elt === this.application.ninja.currentSelectedContainer) 92 if(elt === this.application.ninja.currentDocument.model.domContainer)
93 { 93 {
94 this._clickedOnStage = true; 94 this._clickedOnStage = true;
95 } 95 }