Image Area Selector

An interactive component that allows users to select and define multiple areas within an image. Features customizable dimensions, selectable regions with coordinate tracking, and support for predefined selection areas. Ideal for image annotation, hotspot creation, or region-based image interactions.


Extends: fieldComponent


Fields

Name

Code

Data Type

Description

Image URL

imageLink

text

URL or path of the image to be used for area selection

Height

height

text

Sets the height of the image container (defaults to 200px)

Label

label

multi-locale

Display label for the area selector

ID

resourceId

text

Unique identifier for the component

Style Classes

styleClasses

text

CSS classes for styling

Style

style

text

Custom inline styles

Width

widthClass

text

Controls component width

Value

value

text

Selected area coordinates data

Visible

isVisible

boolean

Controls component visibility

Enabled

enabled

boolean

Controls whether component is enabled

Field Style

fieldStyle

text

Additional field styling options


Methods

Name

Description

initializeSelectAreas

Initializes the area selection functionality with any predefined areas

updateAreas

Updates and tracks the coordinates of selected areas when changes occur

getDivId

Generates unique identifier for the image container element

fromValue

Processes incoming value changes and triggers change event

toValue

Formats area selection data for value updates


Events

Name

Description

onChange

Triggered when selected areas are modified

onBlur

Triggered when the area selector loses focus

onFocus

Triggered when the area selector gains focus