diff options
author | Jonathan Duran | 2012-04-10 08:13:00 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-04-10 08:13:00 -0700 |
commit | 58e049b68e03abbacde93206d2666361022c0858 (patch) | |
tree | f1ce6b8a378674d4abcac68acd0bcca93b838a39 /js/helper-classes/3D/snap-manager.js | |
parent | a9050f96d814469f420bcf3630d16d576b62258e (diff) | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
download | ninja-58e049b68e03abbacde93206d2666361022c0858.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
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) { |