Permalink
Browse files

send presented objects + arg in view events

  • Loading branch information...
1 parent aba1e30 commit cde7b8ca6d4a137c3c0bbd88b3fcb06357bd8bd9 Mark Evans committed Mar 27, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/view.coffee
View
@@ -49,8 +49,8 @@ class egg.View extends egg.Base
for key, d of @constructor.delegatedEvents()
$(@elem).on d.domEvent, d.selector, d, (e) =>
if @delegatedEventsEnabled
- params = {presenter: @presenter()}
- Object.extend(params, e.data.paramsFunc.call(@, e)) if e.data.paramsFunc
+ params = Object.extend({}, @presentedObjects)
+ params.arg = e.data.paramsFunc.call(@, e) if e.data.paramsFunc
@emit(e.data.eventName, params)
e.stopPropagation()
e.preventDefault()

0 comments on commit cde7b8c

Please sign in to comment.