Difference between revisions of "Board18Market6"

From BOARD18 Project WIKI
Jump to navigation Jump to search
(→‎Function traySelect(event): add 4 new functions at end.)
(→‎Function mapMouseEvent(event): add ContextMenu(event))
Line 44: Line 44:
It uses event.witch to determine which mouse button was pressed.
It uses event.witch to determine which mouse button was pressed.
If the left or center button was pressed then it calls the
If the left or center button was pressed then it calls the
boxSelect functon. Otherwise it assumes that the right button
boxSelect function. Otherwise it assumes that the right button
was pressed and does nothing. Right mose events are handled
was pressed and calls the ContextMenu function.
by the jquery.contextMenu library [see the makeMenus function].
== Function ContextMenu(event) ==
This function uses makeMenuItems to create a ContextMenu
The menu will be positioned so as not to overlap the
bounderies of the document. The displayed menu will not scroll.


== Function onMapMenu(event) ==
== Function onMapMenu(event) ==

Revision as of 14:14, 19 August 2016

This page has been updated to comply with Release 2.1.x of BOARD18. Go Back

The board18Market6.js file contains all the functions that respond to various onclick events on the stock chart in the Market page and on the main and tray menues. But right click events that cause a context menu to be displayed are handled by functions in the board18Market5.js file.

Function updateMenu(menuType)

The updateMenu function will update the menu move specific actions

Function makeTrayItems()

The makeTrayItems function will use the BD18.trays array to construct the items to be displayed in the tray menu.

Function registerTrayMenu()

The registerTrayMenu function creates the tray menu on the board18Map page. It uses the jquery context menu plugin and the makeTrayItems function.

Function leftMenuEvent(key)

This function handles the selection of the leftMenu(Tray) and displays the proper BD18.tray.

Function boxPos(event)

This function calculates the board coordinates of a stock price box given the raw coordinates of a mouse click event.

Function traySelect(event)

This function responds to onclick events in the trays canvas. It selects a item from those currently displayed and highlites the selected item.

Function boxSelect(event)

This function responds to left mousedown events in the map canvas. It checks various conditions and executes the appropriate function based on them. If it can find no relevant condition then it merely returns.

Function mapMouseEvent(event)

This function responds to mousedown events on the map canvas. It uses event.witch to determine which mouse button was pressed. If the left or center button was pressed then it calls the boxSelect function. Otherwise it assumes that the right button was pressed and calls the ContextMenu function.

Function ContextMenu(event)

This function uses makeMenuItems to create a ContextMenu The menu will be positioned so as not to overlap the bounderies of the document. The displayed menu will not scroll.

Function onMapMenu(event)

This function uses makeMenuItems to create an onMapMenu

Function doit(mm,e)

This function is called via onclick events coded into the main menu on the board18Map page. the passed parameter indicates the menu choice to be acted upon.

mm is the onclick action to be taken.