diff options
author | Nivesh Rajbhandari | 2012-04-18 13:49:26 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-04-18 13:49:26 -0700 |
commit | e6bdea62cff68837239c1be579926693c1aa7bdf (patch) | |
tree | bddf63c8b1fc493ec64aca642b8887321674bb16 /node_modules/montage/core/event/event-manager.js | |
parent | 7b3ef287f248c07602aefa3ba2cc907e0d16493a (diff) | |
parent | 2e04af953463643791f6362bd8ef4c6ba190abfa (diff) | |
download | ninja-e6bdea62cff68837239c1be579926693c1aa7bdf.tar.gz |
Merge branch 'refs/heads/ninja-internal' into EricMerge
Diffstat (limited to 'node_modules/montage/core/event/event-manager.js')
-rwxr-xr-x | node_modules/montage/core/event/event-manager.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/node_modules/montage/core/event/event-manager.js b/node_modules/montage/core/event/event-manager.js index bef8a67c..75272f85 100755 --- a/node_modules/montage/core/event/event-manager.js +++ b/node_modules/montage/core/event/event-manager.js | |||
@@ -103,13 +103,12 @@ var EventListenerDescriptor = Montage.create(Montage, { | |||
103 | } | 103 | } |
104 | }); | 104 | }); |
105 | 105 | ||
106 | Serializer.defineSerializationUnit("listeners", function(object) { | 106 | Serializer.defineSerializationUnit("listeners", function(object, serializer) { |
107 | var eventManager = defaultEventManager, | 107 | var eventManager = defaultEventManager, |
108 | uuid = object.uuid, | 108 | uuid = object.uuid, |
109 | eventListenerDescriptors = [], | 109 | eventListenerDescriptors = [], |
110 | descriptors, | 110 | descriptors, |
111 | descriptor, | 111 | descriptor, |
112 | listenerDescriptor, | ||
113 | listener; | 112 | listener; |
114 | 113 | ||
115 | for (var type in eventManager.registeredEventListeners) { | 114 | for (var type in eventManager.registeredEventListeners) { |
@@ -119,12 +118,11 @@ Serializer.defineSerializationUnit("listeners", function(object) { | |||
119 | for (var listenerUuid in descriptor.listeners) { | 118 | for (var listenerUuid in descriptor.listeners) { |
120 | listener = descriptor.listeners[listenerUuid]; | 119 | listener = descriptor.listeners[listenerUuid]; |
121 | 120 | ||
122 | eventListenerDescriptor = EventListenerDescriptor.create(); | 121 | eventListenerDescriptors.push({ |
123 | eventListenerDescriptor.type = type; | 122 | type: type, |
124 | eventListenerDescriptor.listener = listener.listener; | 123 | listener: serializer.addObjectReference(listener.listener), |
125 | eventListenerDescriptor.capture = listener.capture; | 124 | capture: listener.capture |
126 | 125 | }); | |
127 | eventListenerDescriptors.push(eventListenerDescriptor); | ||
128 | } | 126 | } |
129 | } | 127 | } |
130 | } | 128 | } |