GridHighlight

GridHighlight

A special Graphics class which handles Grid layer highlighting

Constructor

new GridHighlight()

Source:

Members

name :string

Source:

Track the Grid Highlight name

Type:
  • string

positions :Set

Source:

Track distinct positions which have already been highlighted

Type:
  • Set

Methods

clear(…args)

Source:

Extend the Graphics clear logic to also reset the highlighted positions

Parameters:
Name Type Attributes Description
args <repeatable>

destroy(…args)

Source:

Extend how this Graphics container is destroyed to also remove parent layer references

Parameters:
Name Type Attributes Description
args <repeatable>

highlight(x, y) → {boolean}

Source:

Record a position that is highlighted and return whether or not it should be rendered

Parameters:
Name Type Description
x number

The x-coordinate to highlight

y number

The y-coordinate to highlight

Returns:

Whether or not to draw the highlight for this location

Type
boolean