Use @command to register EventPalette commands

This is at the moment a bit redundant, since you're already in the EventPalette when you see this. But we intend `@command` to communicate intent in the codebase, and its may also end up being used in other ways later.
This commit is contained in:
Corey Johnson & Nathan Sobo
2012-10-19 12:24:40 -06:00
parent 909d1594bc
commit 67d6d86855

View File

@@ -9,7 +9,7 @@ class EventPalette extends SelectList
@activate: (rootView) ->
requireStylesheet 'event-palette/event-palette.css'
@instance = new EventPalette(rootView)
rootView.on 'event-palette:toggle', => @instance.attach()
rootView.command 'event-palette:toggle', => @instance.attach()
@viewClass: ->
"#{super} event-palette"
@@ -20,7 +20,7 @@ class EventPalette extends SelectList
keyBindings: null
initialize: (@rootView) ->
@on 'event-palette:toggle', => @cancel()
@command 'event-palette:toggle', => @cancel()
super
attach: ->