positionItem => positioningItem

This commit is contained in:
Shelley Vohr 2018-02-20 11:28:34 -05:00
parent ba933ef085
commit 5065e159f1
No known key found for this signature in database
GPG key ID: F13993A75599653C

View file

@ -44,7 +44,7 @@ Menu.prototype._init = function () {
} }
Menu.prototype.popup = function (options) { Menu.prototype.popup = function (options) {
let {window, x, y, positionItem, callback} = options let {window, x, y, positioningItem, callback} = options
// no callback passed // no callback passed
if (!callback || typeof callback !== 'function') callback = () => {} if (!callback || typeof callback !== 'function') callback = () => {}
@ -52,7 +52,7 @@ Menu.prototype.popup = function (options) {
// set defaults // set defaults
if (typeof x !== 'number') x = -1 if (typeof x !== 'number') x = -1
if (typeof y !== 'number') y = -1 if (typeof y !== 'number') y = -1
if (typeof positionItem !== 'number') positionItem = -1 if (typeof positioningItem !== 'number') positioningItem = -1
if (!window || (window && window.constructor !== BrowserWindow)) { if (!window || (window && window.constructor !== BrowserWindow)) {
window = BrowserWindow.getFocusedWindow() window = BrowserWindow.getFocusedWindow()
@ -67,8 +67,8 @@ Menu.prototype.popup = function (options) {
} }
} }
this.popupAt(window, x, y, positionItem, callback) this.popupAt(window, x, y, positioningItem, callback)
return { browserWindow: window, x, y, position: positionItem } return { browserWindow: window, x, y, position: positioningItem }
} }
Menu.prototype.closePopup = function (window) { Menu.prototype.closePopup = function (window) {