Handle objects in subscriptions instead of multiple args

This commit is contained in:
Nathan Sobo 2014-08-27 11:57:48 -06:00
parent 475dc6074c
commit b9feed8eb4

View File

@ -166,7 +166,7 @@ class PaneView extends View
onItemAdded: (item, index) =>
@trigger 'pane:item-added', [item, index]
onItemRemoved: (item, index, destroyed) =>
onItemRemoved: ({item, index, destroyed}) =>
if item instanceof $
viewToRemove = item
else if viewToRemove = @viewsByItem.get(item)
@ -180,7 +180,7 @@ class PaneView extends View
@trigger 'pane:item-removed', [item, index]
onItemMoved: (item, newIndex) =>
onItemMoved: ({item, newIndex}) =>
@trigger 'pane:item-moved', [item, newIndex]
onBeforeItemDestroyed: (item) =>