Show:

ia.FeatureLegend Class

Module: ia

A class for rendering a set of legend classes as a html table.

Constructor

ia.FeatureLegend

(
  • id
)

Parameters:

  • id String

    The id of the legend.

Methods

._dispatchItemEvent

() private

Dispatches item events.

_addMouseEvents

(
  • obj
)
private

Adds mouse events to the passed jquery object.

Parameters:

  • obj JQUERY Element

    The jquery object.

_triggerRender

() private

Triggers a render. Prevents over rendering which results in a frozen browser.

addEventListener

(
  • eventType
  • fnc
  • obj
)

Add an event listener.

Parameters:

  • eventType String

    The type of event to listen for.

  • fnc Function

    The function to call when the event occurs.

  • obj Object

    An optional parent object.

clearHighlight

()

Inherited from ia.DiscreteLegend but overwritten in ia\ui\FeatureLegend.js:77

Clears all highlights.

clearSelection

()

Inherited from ia.DiscreteLegend but overwritten in ia\ui\FeatureLegend.js:110

Clears all selections.

dispatchEvent

(
  • event
)

Dispatch an event to the listeners.

Parameters:

  • event Object

    The event object.

hide

()

Hides the legend.

highlight

(
  • id
)

Inherited from ia.DiscreteLegend but overwritten in ia\ui\FeatureLegend.js:69

Highlights the legend class that contains the given id.

Parameters:

  • id String

    The id of the item.

removeListener

(
  • obj
)

Removes all event listeners for the given object.

Parameters:

  • obj Object

    The object.

render

()

Inherited from ia.DiscreteLegend but overwritten in ia\ui\FeatureLegend.js:42

Renders the legend.

renderCategoric

(
  • classes
)

Renders the categoric legend classes.

Parameters:

  • classes ia.Legend

    The legend classes.

renderLegend

(
  • classes
)

Renders the passed legend classes.

Parameters:

  • classes ia.Legend

    The legend classes.

renderNumeric

(
  • classes
)

Renders the numeric legend classes.

Parameters:

  • classes ia.Legend

    The legend classes.

select

(
  • id
)

Inherited from ia.DiscreteLegend but overwritten in ia\ui\FeatureLegend.js:84

Selects.

Parameters:

  • id String

    The id of the item.

show

()

Shows the legend.

unselect

(
  • id
)

Inherited from ia.DiscreteLegend but overwritten in ia\ui\FeatureLegend.js:97

Unselects.

Parameters:

  • id String

    The id of the item.

Properties

colorPalette

ia.ColorPalette

Specifies a color palette for the legend.

container

JQUERY Element

The container that holds the object.

geography

ia.Geography

A geography object.

highlightColor

String

The item highlight color.

id

String

The id.

interactive

Boolean

Indicates if the legend is interactive.

Default: true

isLegendComponent

Boolean

Indicates this is a legend component.

Default: true

layout

String

The layout of the legend.

Default: "vertical"

scrollBox

ia.ScrollBox

Indicates if theres a scrollbox attached.

Default: true

selectionColor

String

The item selection color.

style

Object

The style.

Default: {fillStyle:'#EFEFEF', strokeStyle:'#cccccc', lineWidth:'0.5', lineJoin:'miter'}

thematic

ia.Thematic

Specifies a thematic for the legend.