aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/draw-utils.js
diff options
context:
space:
mode:
authorhwc4872012-01-31 10:46:48 -0800
committerhwc4872012-01-31 10:46:48 -0800
commitaa1b4b78d9e1b9cc15529dbf7196b7ac8a88e260 (patch)
tree9fd0364c371b8c9bbe1620b9a5a58a45dd0574a9 /js/helper-classes/3D/draw-utils.js
parent0b8d8b2eb595b64ef53440b949f3c5ec891daf8a (diff)
parent6066b9bda2990c9d6b4311d221b0d0c773b20f60 (diff)
downloadninja-aa1b4b78d9e1b9cc15529dbf7196b7ac8a88e260.tar.gz
Merge branch 'ToolFixes' of github.com:mqg734/ninja-internal into working
Conflicts: js/stage/stage.reel/stage.js
Diffstat (limited to 'js/helper-classes/3D/draw-utils.js')
-rw-r--r--js/helper-classes/3D/draw-utils.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index 3fd6e8fc..c26a5cd1 100644
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -107,6 +107,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
107 107
108 this.eventManager.addEventListener("elementAdded", this, false); 108 this.eventManager.addEventListener("elementAdded", this, false);
109 this.eventManager.addEventListener("elementDeleted", this, false); 109 this.eventManager.addEventListener("elementDeleted", this, false);
110 this.eventManager.addEventListener("elementChange", this, false);
110 } 111 }
111 }, 112 },
112 113
@@ -124,6 +125,27 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
124 }, 125 },
125 126
126 127
128 handleElementChange: {
129 value: function(event) {
130 var els = event.detail.data.els;
131 if(els)
132 {
133 var len = els.length,
134 i = 0,
135 item,
136 el;
137
138 for(i=0; i < len; i++) {
139 item = els[i];
140 el = item._element || item;
141 el.elementModel.props3D.elementPlane.init();
142 }
143
144 this.drawWorkingPlane();
145 }
146 }
147 },
148
127 /////////////////////////////////////////////////////////////////////// 149 ///////////////////////////////////////////////////////////////////////
128 // Methods 150 // Methods
129 /////////////////////////////////////////////////////////////////////// 151 ///////////////////////////////////////////////////////////////////////
@@ -150,6 +172,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
150 plane.setElement( elt ); 172 plane.setElement( elt );
151 plane.init(); 173 plane.init();
152 this._planesArray.push( plane ); 174 this._planesArray.push( plane );
175 elt.elementModel.props3D.elementPlane = plane;
153 } 176 }
154 }, 177 },
155 178
@@ -166,6 +189,8 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
166 189
167 // Then remove the element 190 // Then remove the element
168 this._eltArray.splice(i, 1); 191 this._eltArray.splice(i, 1);
192
193 // TODO - May need to delete props3D and elementPlane as well
169 return; 194 return;
170 } 195 }
171 } 196 }