Documentation / @ripl/core / ElementEventMap
Interface: ElementEventMap
Defined in: packages/core/src/core/element.ts:109
Event map for elements, extending the base event map with lifecycle and interaction events.
Extends
Indexable
[
key:string]:unknown
Properties
| Property | Type | Description | Overrides | Defined in |
|---|---|---|---|---|
attached | Group | Emitted when the element is attached to a parent Group, carrying that group. | - | packages/core/src/core/element.ts:113 |
click | object | Emitted when the element is clicked, carrying the pointer position. | - | packages/core/src/core/element.ts:135 |
click.x | number | X coordinate of the pointer, in element-local space. | - | packages/core/src/core/element.ts:137 |
click.y | number | Y coordinate of the pointer, in element-local space. | - | packages/core/src/core/element.ts:139 |
destroyed | null | Emitted when the element is destroyed; carries no payload. | EventMap.destroyed | packages/core/src/core/element.ts:179 |
detached | Group | Emitted when the element is detached from a parent Group, carrying the former parent group. | - | packages/core/src/core/element.ts:115 |
drag | object | Emitted continuously while dragging the element, carrying the current position, drag start, and delta from the start. | - | packages/core/src/core/element.ts:149 |
drag.deltaX | number | Horizontal distance moved since the drag started, in pixels. | - | packages/core/src/core/element.ts:159 |
drag.deltaY | number | Vertical distance moved since the drag started, in pixels. | - | packages/core/src/core/element.ts:161 |
drag.startX | number | X coordinate at which the drag started, in element-local space. | - | packages/core/src/core/element.ts:155 |
drag.startY | number | Y coordinate at which the drag started, in element-local space. | - | packages/core/src/core/element.ts:157 |
drag.x | number | Current X coordinate of the pointer, in element-local space. | - | packages/core/src/core/element.ts:151 |
drag.y | number | Current Y coordinate of the pointer, in element-local space. | - | packages/core/src/core/element.ts:153 |
dragend | object | Emitted when a drag gesture on the element ends, carrying the final position, drag start, and total delta. | - | packages/core/src/core/element.ts:164 |
dragend.deltaX | number | Total horizontal distance moved over the drag, in pixels. | - | packages/core/src/core/element.ts:174 |
dragend.deltaY | number | Total vertical distance moved over the drag, in pixels. | - | packages/core/src/core/element.ts:176 |
dragend.startX | number | X coordinate at which the drag started, in element-local space. | - | packages/core/src/core/element.ts:170 |
dragend.startY | number | Y coordinate at which the drag started, in element-local space. | - | packages/core/src/core/element.ts:172 |
dragend.x | number | Final X coordinate of the pointer, in element-local space. | - | packages/core/src/core/element.ts:166 |
dragend.y | number | Final Y coordinate of the pointer, in element-local space. | - | packages/core/src/core/element.ts:168 |
dragstart | object | Emitted when a drag gesture begins on the element, carrying the start position. | - | packages/core/src/core/element.ts:142 |
dragstart.x | number | X coordinate at which the drag started, in element-local space. | - | packages/core/src/core/element.ts:144 |
dragstart.y | number | Y coordinate at which the drag started, in element-local space. | - | packages/core/src/core/element.ts:146 |
graph | null | Emitted when the element tree changes, notifying the scene to rebuild its graph; carries no payload. | - | packages/core/src/core/element.ts:111 |
mouseenter | null | Emitted when the pointer enters the element; carries no payload. | - | packages/core/src/core/element.ts:124 |
mouseleave | null | Emitted when the pointer leaves the element; carries no payload. | - | packages/core/src/core/element.ts:126 |
mousemove | object | Emitted as the pointer moves over the element, carrying its position. | - | packages/core/src/core/element.ts:128 |
mousemove.x | number | X coordinate of the pointer, in element-local space. | - | packages/core/src/core/element.ts:130 |
mousemove.y | number | Y coordinate of the pointer, in element-local space. | - | packages/core/src/core/element.ts:132 |
updated | object | Emitted when a state value changes, carrying the affected key and its new value. | - | packages/core/src/core/element.ts:117 |
updated.key | PropertyKey | State property key that changed. | - | packages/core/src/core/element.ts:119 |
updated.value | unknown | New value assigned to the property. | - | packages/core/src/core/element.ts:121 |