positionItem => positioningItem
This commit is contained in:
parent
ba933ef085
commit
5065e159f1
1 changed files with 4 additions and 4 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue