ia.FeatureLegend Class
A class for rendering a set of legend classes as a html table.
Constructor
ia.FeatureLegend
-
id
Parameters:
-
idStringThe id of the legend.
Item Index
Methods
Methods
._dispatchItemEvent
()
private
Dispatches item events.
_addMouseEvents
-
obj
Adds mouse events to the passed jquery object.
Parameters:
-
objJQUERY ElementThe 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:
-
eventTypeStringThe type of event to listen for.
-
fncFunctionThe function to call when the event occurs.
-
objObjectAn optional parent object.
clearHighlight
()
Clears all highlights.
clearSelection
()
Clears all selections.
dispatchEvent
-
event
Dispatch an event to the listeners.
Parameters:
-
eventObjectThe event object.
hide
()
Hides the legend.
highlight
-
id
Highlights the legend class that contains the given id.
Parameters:
-
idStringThe id of the item.
removeListener
-
obj
Removes all event listeners for the given object.
Parameters:
-
objObjectThe object.
render
()
Renders the legend.
renderCategoric
-
classes
Renders the categoric legend classes.
Parameters:
-
classesia.LegendThe legend classes.
renderLegend
-
classes
Renders the passed legend classes.
Parameters:
-
classesia.LegendThe legend classes.
renderNumeric
-
classes
Renders the numeric legend classes.
Parameters:
-
classesia.LegendThe legend classes.
select
-
id
Selects.
Parameters:
-
idStringThe id of the item.
show
()
Shows the legend.
unselect
-
id
Unselects.
Parameters:
-
idStringThe id of the item.
Properties
container
JQUERY Element
The container that holds the 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"
selectionColor
String
The item selection color.
style
Object
The style.
Default: {fillStyle:'#EFEFEF', strokeStyle:'#cccccc', lineWidth:'0.5', lineJoin:'miter'}