Terminology
For many of the concepts and functionality described within the documentation, it will help to explain the basic terminology used:
- area - An area on an image map, specifically, defined by an
area
tag (HTMLAreaElementExternal link leaves this site) in the HTML markup. - area group - One or more areas that are grouped together logically, each defined by an
area
tag. Area groups can be manipulated as if they were a single area. Often when discussing functionality the documentation may usearea
andarea group
interchangeably. In most cases, functionality applies to anarea group
, which can be one or more areas. If the distinction is important, it will be referenced asa specific area.
- map key - A token used to identify an
area
orarea group
. While you can use ImageMapster to manipulate things by selecting actualarea
elements from your HTML, it is often more convenient to refer to anarea group
. Themap key
refers to an identifier that you provide via the mapKey option for eacharea
and allows you to create groups (when you use the same identifier for multiple areas). If you don’t want to create any groups and don’t want to refer to areas other than via their HTML tags, you do not have to provide a map key. - primary key - An
area
can contain more than one key in the attribute identified bymapKey
, separated by commas. The first one is theprimary key
and defines what areas are higlighted together when anarea
is clicked. However, you can add more keys to create other groupings, which can be activated using the set method. - select - When you select something, it becomes active until deselected. Selecting is like checking a box. It remains selected until deselected.
- highlight - A highlight, unlike a selection, is temporary, and can only apply to a single
area
at once. Usually something is highlighted when the user moves their mouse pointer over it, but a highlight can be set programatically as well with the highlight method. - static state - Areas may also be in a staticState which means that their selection state cannot be changed. A static state can either be
true
orfalse
; whentrue
, anarea
appears selected, but can never be deselected. Static state does not affect selection state. When querying the state of a static statearea
, even if it appears selected (because it’s static state istrue
), it’s selection state will always befalse
.