ii_hotspots.js

hs = hotspots_add(name, klass, type, scale, shape)

Creates a hotspot on the image. Name and klass name the hotspot. Type gives the type of shape, for instance circle:hotspot type. Scale is one of world:scale type, screen:scale type or image:scale type and determines how the coordinates of the hotspot will be given. Finally, Shape gives the actual shape of the hotspot in the relevant format as shown in the hotspot type table.

hs = hotspots_hotspot_named(name, klass)

Returns the named hotspot.

hotspots_activate()

Makes all the defined hotspots active. Until active a hotspot will not respond to user actions or display itself.

hotspots_enable(hs, setting)

Enables or disables hotspot hs depending on whether setting is true or false. A disabled hotspot does not highlight or get passed to callback if the user clicks inside it.

hotspots_select(hs, setting)

Selects or de-selects the hotspot hs depending on whether setting is true or false.

hotspots_toggle(hs)

Selects and de-selects hs an alternate calls.

selected = hotspots_selected(hs)

Returns whether the hotspot is selected.