|
1 | 1 | ## Changelog ##
|
2 | 2 |
|
| 3 | +### 3.0-beta.1 |
| 4 | + |
| 5 | +#### Migrating |
| 6 | + |
| 7 | +To migrate, you only need to change all callback functions to the new arguments (`icon`, `build`, `visible`, `disabled`, item `callback` and global item `callback`). Also if you listen to `contextmenu` events, please check if you still get the correct data. |
| 8 | + |
| 9 | +#### Changed |
| 10 | + |
| 11 | +* Restructured the code to use Webpack with Babel. Build the code with `yarn run webpack`. |
| 12 | +* Changed linting to ESLint. |
| 13 | +* Moved to [BrowserStack](https://www.browserstack.com/) for browser testing. |
| 14 | +* Added JSDoc for generated [API documentation](https://swisnl.github.io/jQuery-contextMenu/3.x/api). |
| 15 | +* Added [3.x documentation](https://swisnl.github.io/jQuery-contextMenu/) on GitHub pages. |
| 16 | +* The previous `opt` and `root` arguments are now described as `currentMenuData` and `rootMenuData`, which are documented in [ContextMenuData](https://swisnl.github.io/jQuery-contextMenu/3.x/api/ContextMenuData.html). |
| 17 | +* Defined a few callback types to illustrate the arguments with which they are called. |
| 18 | +* Build callback [ContextMenuBuildCallback](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuBuildCallback__anchor) is now `function(e, $currentTrigger)`. |
| 19 | +* Icon callback [ContextMenuIconCallback](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuIconCallback__anchor) is now `function(e, $item, key, item, currentMenuData, rootMenuData)`. |
| 20 | +* The visibile, disabled, global callback and item callback [ContextMenuItemCallback](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuItemCallback__anchor) is now `function(e, key, currentMenuData, rootMenuData)`. |
| 21 | +* If you define custom menu item types in `$.contextMenu.types` they get called as [ContextMenuItemTypeCallback](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuItemTypeCallback__anchor) with `function(e, item, currentMenuData, rootMenuData)`. |
| 22 | +* All events should always include event data containing the ContextMenuData as described in [ContextMenuEvent](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuEvent__anchor). So if you listen to `contextmenu` events you should always have the data available. |
| 23 | + |
| 24 | +#### Fixed |
| 25 | + |
| 26 | +* Add options argument to events.activates. ([Issue #580](https://github.com/swisnl/jQuery-contextMenu/issues/580)) |
| 27 | +* Fix support for `$(element).contextMenu('update')` which was broken. |
| 28 | +* Fixed bug in checking visibility of items for menu visibility. If a menu item was defined as `{ item: { visible: false } }` it would not stop the menu from showing. |
| 29 | + |
3 | 30 | ### 2.6.3
|
4 | 31 |
|
5 | 32 | #### Fixed
|
|
0 commit comments