Merge pull request #4192 from evgenyzinoviev/menu-pr
Menu.popup: specify positioning item (OS X)
This commit is contained in:
commit
ea9b0cfed0
7 changed files with 20 additions and 10 deletions
|
@ -237,15 +237,18 @@ Generally, the `template` is just an array of `options` for constructing a
|
|||
You can also attach other fields to the element of the `template` and they
|
||||
will become properties of the constructed menu items.
|
||||
|
||||
### `Menu.popup([browserWindow, x, y])`
|
||||
### `Menu.popup([browserWindow, x, y, positioningItem])`
|
||||
|
||||
* `browserWindow` BrowserWindow (optional)
|
||||
* `x` Number (optional)
|
||||
* `y` Number (**required** if `x` is used)
|
||||
* `positioningItem` Number (optional) _OS X_
|
||||
|
||||
Pops up this menu as a context menu in the `browserWindow`. You
|
||||
can optionally provide a `x,y` coordinate to place the menu at, otherwise it
|
||||
will be placed at the current mouse cursor position.
|
||||
will be placed at the current mouse cursor position. `positioningItem` is the
|
||||
index of the menu item to be positioned under the mouse cursor at the specified
|
||||
coordinates (only supported on OS X).
|
||||
|
||||
### `Menu.append(menuItem)`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue