renamed variable to make code more understandable

This commit is contained in:
Erik Håkansson
2014-05-11 18:23:04 +02:00
parent 6d9fed6644
commit 5ca6d01911

View File

@@ -33,11 +33,11 @@ class ContextMenuManager
# Returns nothing.
add: (name, object, {devMode}={}) ->
for selector, items of object
for label, command of items
if (typeof command == 'object')
@addBySelector(selector, command, {devMode})
for label, commandOrSubmenu of items
if (typeof commandOrSubmenu == 'object')
@addBySelector(selector, commandOrSubmenu, {devMode})
else
@addBySelector(selector, {label, command}, {devMode})
@addBySelector(selector, {label, commandOrSubmenu}, {devMode})
# Registers a command to be displayed when the relevant item is right
# clicked.