diff options
author | Eric Guzman | 2012-04-09 15:44:09 -0700 |
---|---|---|
committer | Eric Guzman | 2012-04-09 15:44:09 -0700 |
commit | a27915e900eb768dd9db1f0dd441961ea80bfaa6 (patch) | |
tree | 593f429f0b3294103a059ae9f6ed03858288deb7 /js/helper-classes/3D/snap-manager.js | |
parent | afcaa157f7bc067cf00de91b43b2a71e9b64b7b3 (diff) | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
download | ninja-a27915e900eb768dd9db1f0dd441961ea80bfaa6.tar.gz |
Merge branch 'refs/heads/master' into CSSPanelUpdates
Diffstat (limited to 'js/helper-classes/3D/snap-manager.js')
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index 9f6b9ed1..a401c363 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js | |||
@@ -124,6 +124,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
124 | initialize: { | 124 | initialize: { |
125 | value: function() { | 125 | value: function() { |
126 | this.eventManager.addEventListener("elementsRemoved", this, false); | 126 | this.eventManager.addEventListener("elementsRemoved", this, false); |
127 | this.eventManager.addEventListener("elementReplaced", this, false); | ||
127 | } | 128 | } |
128 | }, | 129 | }, |
129 | 130 | ||
@@ -170,15 +171,19 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
170 | if(Array.isArray(elements)) { | 171 | if(Array.isArray(elements)) { |
171 | elements = Array.prototype.slice.call(elements, 0); | 172 | elements = Array.prototype.slice.call(elements, 0); |
172 | elements.forEach(function(element) { | 173 | elements.forEach(function(element) { |
173 | element = element._element || element; | ||
174 | self.removeElementFrom2DCache(element); | 174 | self.removeElementFrom2DCache(element); |
175 | }); | 175 | }); |
176 | } else { | 176 | } else { |
177 | this.removeElementFrom2DCache(elements._element || elements); | 177 | this.removeElementFrom2DCache(elements); |
178 | } | 178 | } |
179 | } | 179 | } |
180 | }, | 180 | }, |
181 | 181 | ||
182 | handleElementReplaced: { | ||
183 | value: function(event) { | ||
184 | this._isCacheInvalid = true; | ||
185 | } | ||
186 | }, | ||
182 | 187 | ||
183 | setCurrentStage: { | 188 | setCurrentStage: { |
184 | value: function(stage) { | 189 | value: function(stage) { |