Class: Menu

Menu

handsontable/src/plugins/contextMenu/menu.js, line 24

Methods

handsontable/src/plugins/contextMenu/menu.js, line 162

close(closeParent)

Close menu.

Parameters:
Name Type Default Description
closeParent Boolean false optional

if true try to close parent menu if exists.

handsontable/src/plugins/contextMenu/menu.js, line 233

closeAllSubMenus()

Close all opened sub menus.

handsontable/src/plugins/contextMenu/menu.js, line 220

closeSubMenu(row)

Close sub menu at row index.

Parameters:
Name Type Description
row Number

Row index.

handsontable/src/plugins/contextMenu/menu.js, line 249

destroy()

Destroy instance.

handsontable/src/plugins/contextMenu/menu.js, line 270

executeCommand(event)

Execute menu command.

Parameters:
Name Type Description
event Event optional
handsontable/src/plugins/contextMenu/menu.js, line 242

isAllSubMenusClosed(){Boolean}

Checks if all created and opened sub menus are closed.

Returns: {Boolean}
handsontable/src/plugins/contextMenu/menu.js, line 261

isOpened(){Boolean}

Checks if menu was opened.

Returns: {Boolean} Returns true if menu was opened.
handsontable/src/plugins/contextMenu/menu.js, line 92

isSubMenu(){Boolean}

Check if menu is using as sub-menu.

Returns: {Boolean}
handsontable/src/plugins/contextMenu/menu.js, line 686

onAfterSelection(r, c, r2, c2, preventScrolling, selectionLayerLevel)

On after selection listener.

Parameters:
Name Type Description
r Number

Selection start row index.

c Number

Selection start column index.

r2 Number

Selection end row index.

c2 Number

Selection end column index.

preventScrolling Object

Object with value property where its value change will be observed.

selectionLayerLevel Number

The number which indicates what selection layer is currently modified.

handsontable/src/plugins/contextMenu/menu.js, line 102

open()

Open menu.

Fires:
handsontable/src/plugins/contextMenu/menu.js, line 189

openSubMenu(row){Menu|Boolean}

Open sub menu at the provided row index.

Parameters:
Name Type Description
row Number

Row index.

Returns: {Menu|Boolean} Returns created menu or false if no one menu was created.
handsontable/src/plugins/contextMenu/menu.js, line 391

selectFirstCell()

Select first cell in opened menu.

handsontable/src/plugins/contextMenu/menu.js, line 404

selectLastCell()

Select last cell in opened menu.

handsontable/src/plugins/contextMenu/menu.js, line 421

selectNextCell(row, col)

Select next cell in opened menu.

Parameters:
Name Type Description
row Number

Row index.

col Number

Column index.

handsontable/src/plugins/contextMenu/menu.js, line 441

selectPrevCell(row, col)

Select previous cell in opened menu.

Parameters:
Name Type Description
row Number

Row index.

col Number

Column index.

handsontable/src/plugins/contextMenu/menu.js, line 73

setMenuItems(menuItems)

Set array of objects which defines menu items.

Parameters:
Name Type Description
menuItems Array

Menu items to display.

handsontable/src/plugins/contextMenu/menu.js, line 83

setOffset(area, offset)

Set offset menu position for specified area (above, below, left or right).

Parameters:
Name Type Description
area String

Specified area name (above, below, left or right).

offset Number

Offset value.

handsontable/src/plugins/contextMenu/menu.js, line 308

setPosition(coords)

Set menu position based on dom event or based on literal object.

Parameters:
Name Type Description
coords Event | Object

Event or literal Object with coordinates.

handsontable/src/plugins/contextMenu/menu.js, line 337

setPositionAboveCursor(cursor)

Set menu position above cursor object.

Parameters:
Name Type Description
cursor Cursor

Cursor object.

handsontable/src/plugins/contextMenu/menu.js, line 351

setPositionBelowCursor(cursor)

Set menu position below cursor object.

Parameters:
Name Type Description
cursor Cursor

Cursor object.

handsontable/src/plugins/contextMenu/menu.js, line 382

setPositionOnLeftOfCursor(cursor)

Set menu position on the left of cursor object.

Parameters:
Name Type Description
cursor Cursor

Cursor object.

handsontable/src/plugins/contextMenu/menu.js, line 365

setPositionOnRightOfCursor(cursor)

Set menu position on the right of cursor object.

Parameters:
Name Type Description
cursor Cursor

Cursor object.