Skip to content

Commit

Permalink
Accidentally copied ContextMenuIconCallback so it was defined twice
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrala committed Dec 30, 2017
1 parent 4390407 commit db9be95
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions src/js/defaults/interfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,7 @@
}
*
* @callback ContextMenuIconCallback
* @param {ContextMenuEvent|JQuery.Event} e,
* @param {JQuery} $t
* @param {string} key
* @param {ContextMenuItem} item
* @param {ContextMenuData} currentMenuData
* @param {ContextMenuData} rootMenuData
*/

/**
* Specifies the icon class to set for the item.
*
* When using a string icons must be defined in CSS with selectors like `.context-menu-item.context-menu-icon-edit`, where edit is the icon class specified.
*
* When using a callback you can return a class string to use that as the class on the item. You can also modify the element by using the $itemElement argument.
*
* @example
* var items = {
firstCommand: {
name: "Copy",
icon: function(e, $itemElement, itemKey, item, currentMenuData, rootMenuData){
// Set the content to the menu trigger selector and add an bootstrap icon to the item.
$itemElement.html('<span class="glyphicon glyphicon-star" aria-hidden="true"></span> ' + currentMenuData.selector);
// Add the context-menu-icon-updated class to the item
return 'context-menu-icon-updated';
}
},
secondCommand: {
name: "Paste",
icon: "paste" // Class context-menu-icon-paste is used on the menu item.
}
}
*
* @callback ContextMenuIconCallback
* @param {ContextMenuEvent|JQuery.Event} e,
* @param {ContextMenuEvent|JQuery.Event} e
* @param {JQuery} $t
* @param {string} key
* @param {ContextMenuItem} item
Expand Down

0 comments on commit db9be95

Please sign in to comment.