Difference between revisions of "Board18Map4"

From BOARD18 Project WIKI
Jump to navigation Jump to search
(Initial version of this page)
 
(Expanded stub)
Line 1: Line 1:
{{Stub}}
board18Map4.js contains all the functions that
implement the multi token selection logic for
cases where more than one token is on the same hex.
__NOTOC__
==Function selectToken(event)==
The selectToken function uses the
[[OnHex Object|BD18.hexList.tokens array]]
to display a graphical list of the tokens on a
given hex. <br>This list is displayed on canvas3 which is
defined within the rightofpage division and the canvas3
click event is turned on.
 
Clicking on
a token should have the side effect of causing canvas3
to be reset.
==Function hideTknMenu()==
The hideTknMenu function resets the canvas3 token menu.
This involves three actions:
# The menue is made transparent.
# The menu is moved 200 px above the browser window.
# The canvas3 click event is turned off.
==Function delayHideTknMenu()==
The delayHideTknMenu function waits 2 seconds before
calling the hideTknMenu function.
==Function killHideTknMenu()==
The killHideTknMenu function stops any delayed
calling of the hideTknMenu function.
==Function doTknMenu(event)==
The doTknMenu function processes a click on canvas3.<br>
This canvas is used to select one of multiple tokens
on the same hex. <br>The requested function is performed
for the selected token.


[[Category:Design]]
[[Category:Design]]

Revision as of 19:09, 19 June 2013

board18Map4.js contains all the functions that implement the multi token selection logic for cases where more than one token is on the same hex.


Function selectToken(event)

The selectToken function uses the BD18.hexList.tokens array to display a graphical list of the tokens on a given hex.
This list is displayed on canvas3 which is defined within the rightofpage division and the canvas3 click event is turned on.

Clicking on a token should have the side effect of causing canvas3 to be reset.

Function hideTknMenu()

The hideTknMenu function resets the canvas3 token menu. This involves three actions:

  1. The menue is made transparent.
  2. The menu is moved 200 px above the browser window.
  3. The canvas3 click event is turned off.

Function delayHideTknMenu()

The delayHideTknMenu function waits 2 seconds before calling the hideTknMenu function.

Function killHideTknMenu()

The killHideTknMenu function stops any delayed calling of the hideTknMenu function.

Function doTknMenu(event)

The doTknMenu function processes a click on canvas3.
This canvas is used to select one of multiple tokens on the same hex.
The requested function is performed for the selected token.