interface HitRegionSpecification

Specifies which properties a hit region responds too.

Properties
click, contextMenu, cursor, doubleClick, grab, grabEnd, id, keyDown, keyUp, mouseDown, mouseEnter, mouseLeave, mouseMove, mouseUp, parentId, wheel

Properties

click
optional
Type:
(event: MouseHitEvent) => void
contextMenu
optional
Type:
(event: MouseHitEvent) => void
cursor
optional

Cursor on hover.

Type:
string
doubleClick
optional
Type:
(event: MouseHitEvent) => void
grab
optional
Type:
(event: GrabHitEvent) => void
grabEnd
optional
Type:
() => void
id

Unique identifier for this region.

While it is preferred to make hit regions outside of the draw loop, it is allowed and the ID is what establishes conceptually a unique region.

Type:
string
keyDown
optional
Type:
(event: KeyboardHitEvent) => void
keyUp
optional
Type:
(event: KeyboardHitEvent) => void
mouseDown
optional
Type:
(event: MouseHitEvent) => void
mouseEnter
optional
Type:
(event: MouseHitEvent) => void
mouseLeave
optional
Type:
(event: MouseHitEvent) => void
mouseMove
optional
Type:
(event: MouseHitEvent) => void
mouseUp
optional
Type:
(event: MouseHitEvent) => void
parentId
optional

Optional identifier of a parent region. Some region properties ‘bubble up’ to parent regions.

For example if a cursor is set on a parent, but not on the child region, the parent’s cursor will be displayed even if the child is hovered.

Type:
string
wheel
optional
Type:
(event: WheelHitEvent) => void