ContextMenu

ContextMenu

This module renders context menu on search result tiles

Constructor

new ContextMenu()

Methods

addCommands(contextMenu, menuHtml, objectId)

Add commands to context menu

Parameters:
Name Type Description
contextMenu object

context menu info

menuHtml object

menu element

objectId string

objectId

bindEvents()

Binds events

onContextMenuIconClick(event)

On context menu icon click

Parameters:
Name Type Description
event object

event data

onContextMenuRightClick(event)

On context menu right click

Parameters:
Name Type Description
event object

event data

registerContextMenuEvents(contextMenu, hitHtml, contextMenuHtml)

Register events on context menu.

Parameters:
Name Type Description
contextMenu object

context menu info

hitHtml object

hit element

contextMenuHtml object

context menu element

render(hitHtml, hit, contextMenu)

Renders context menu on search result tiles

Parameters:
Name Type Description
hitHtml object

hit html

hit object

hit data

contextMenu object

context menu info

toggleContextMenu(hitElement, clientY, clientX)

Toggles context menu

Parameters:
Name Type Description
hitElement object

hit element

clientY number

vertical coordinate of the mouse pointer

clientX number

horizontal coordinate of the mouse pointer