IITC.portal.highlighter

Namespace for portal highlighters: registering, switching and applying portal highlight styles.

Methods

static add(name, data)

Adds a new portal highlighter to map. The highlighter is a function that will be called for each portal.

Parameters:
Name Type Description
name string

The name of the highlighter.

data function

The callback function for the highlighter. This function receives data about the portal and decides how to highlight it.

static change(name)

Changes the current portal highlights based on the selected highlighter.

Parameters:
Name Type Description
name string

The name of the highlighter to be applied.

static highlight(p)

Applies the currently active highlighter to a specific portal. This function is typically called for each portal on the map.

Parameters:
Name Type Description
p Object

The portal object to be highlighted.

static resetAll()

Resets the highlighting of all portals, returning them to their default style.

static updateControl()

Updates the portal highlighter dropdown list, recreating the dropdown list of available highlighters.