standardize by hand
This commit is contained in:
parent
e6698102c9
commit
2c3cacdc08
8 changed files with 16 additions and 15 deletions
|
|
@ -93,7 +93,7 @@ Menu.prototype._init = function () {
|
|||
this.commandsMap = {}
|
||||
this.groupsMap = {}
|
||||
this.items = []
|
||||
return this.delegate = {
|
||||
this.delegate = {
|
||||
isCommandIdChecked: (commandId) => {
|
||||
var command = this.commandsMap[commandId]
|
||||
return command != null ? command.checked : undefined
|
||||
|
|
@ -142,7 +142,7 @@ Menu.prototype._init = function () {
|
|||
}
|
||||
|
||||
Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||
if (typeof window != 'object' || window.constructor !== BrowserWindow) {
|
||||
if (typeof window !== 'object' || window.constructor !== BrowserWindow) {
|
||||
// Shift.
|
||||
positioningItem = y
|
||||
y = x
|
||||
|
|
@ -224,7 +224,7 @@ Menu.prototype.insert = function (pos, item) {
|
|||
|
||||
// Remember the items.
|
||||
this.items.splice(pos, 0, item)
|
||||
return this.commandsMap[item.commandId] = item
|
||||
this.commandsMap[item.commandId] = item
|
||||
}
|
||||
|
||||
// Force menuWillShow to be called
|
||||
|
|
@ -284,7 +284,7 @@ Menu.buildFromTemplate = function (template) {
|
|||
}
|
||||
positionedTemplate.splice(insertIndex, 0, item)
|
||||
}
|
||||
menu = new Menu
|
||||
menu = new Menu()
|
||||
for (k = 0, len1 = positionedTemplate.length; k < len1; k++) {
|
||||
item = positionedTemplate[k]
|
||||
if (typeof item !== 'object') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue