ContextMenu
The context menu html object which reacts to context clicks
Constructor Summary
Public Constructor | ||
public |
constructor(ui: UI, mouseHandler: MouseHandler) Constructor for the context menu class |
Member Summary
Public Members | ||
public |
component: * |
|
public |
contextMenu: * |
|
public |
isDisplayed: * |
|
public |
menuPosX: * |
|
public |
menuPosY: * |
|
public |
mouseHandler: * |
|
public |
ui: * |
Method Summary
Public Methods | ||
public |
contextmenuEventListener(event: HTMLEvent, x: Number, y: Number) Function called by canvas when context menu click happens |
|
public |
Initializes the listeners for clicks upon the context-menu element |
|
public |
repositionMenu(event: HTMLEvent) Repositions the context menu based on where the click was adjusting for clicks that might place the context menu off screen |
|
public |
|
Public Constructors
public constructor(ui: UI, mouseHandler: MouseHandler) source
Constructor for the context menu class
Params:
Name | Type | Attribute | Description |
ui | UI | reference to the master UI object |
|
mouseHandler | MouseHandler | reference to the master mouseHandler object |
Public Members
public component: * source
public contextMenu: * source
public isDisplayed: * source
public menuPosX: * source
public menuPosY: * source
public mouseHandler: * source
public ui: * source
Public Methods
public contextmenuEventListener(event: HTMLEvent, x: Number, y: Number) source
Function called by canvas when context menu click happens
public repositionMenu(event: HTMLEvent) source
Repositions the context menu based on where the click was adjusting for clicks that might place the context menu off screen
Params:
Name | Type | Attribute | Description |
event | HTMLEvent | click event that toggles the context menu opening |