Legend


The legend is an extension that can be added to an interactive tab


Note: that the legend will work with some other systems

How to Initialize the legend ?


The initialization of the legend is a two step process:

  • First call the Init function: It will initiate the the HTML part and the CSS
  • Then use Add function to add the data.

Class Details


Functions:


Name

Arguments

Return

Description

Init

  • String: NewID - HMTL ID defining the position in the DOM of the tab
  • String: Name - Define the name of the legend all legend component will be defined by this name (this is to avoid mixing if you use different legend so be sure to use different name for each tab).
  • CSS Class: LegendCSS - CSS off the legend (some CSS are by default)

VOID

This function will generate the whole HTML code of the legend, it will also apply the CSS that you decide

add

  • String: Symbol - This is the symbol (or text) that needed to be showed in the box.
  • String: Definition - Description of the symbol.
  • CSS Class: CSS - CSS of the box
  • CSS Class: InnerCSS - CSS that apply to everything inside the box

VOID

This function add a new definition to the legend.



Private Details



All private details are usable but its recommended to not use anythings of those. It might modify the good working of the class


Variables (Members):


Name

Type

Default Value

Description

id

String

null

HTML ID where the legend is located

idCount

Integer

0

This hold the number of definition to make different ID for each definition.

name

String

null

Name of table use to define all other IDs



Functions:


Name

Arguments

Return

Description

GetLegendId (Util function)

  • Integer: num - Numerical ID of the definition

String

This function is called to convert a numerical ID of a definition into a string.

Created with the Personal Edition of HelpNDoc: Generate EPub eBooks with ease