aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-08 16:59:59 -0700
committerValerio Virgillito2012-06-08 16:59:59 -0700
commit806974142d44afdd23534bf2d18eff0a8e701e0c (patch)
tree811acab38c063ca4fb594bcab0a6dc5e143f29a2 /js/tools
parentd14249dd2d76e9eb8d14733c10393d36bd2ea8ee (diff)
downloadninja-806974142d44afdd23534bf2d18eff0a8e701e0c.tar.gz
rewrite: currentSelectedContainer -> domContainer
Fixed the currentSelectedContainer by removing bindings and using property change on the current document added the red outline back. Signed-off-by: Valerio Virgillito <valerio@motorola.com>
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 }