Documentation / @ripl/core / ElementEventMap
Interface: ElementEventMap ​
Defined in: packages/core/src/core/element.ts:102
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:106 |
click | object | Emitted when the element is clicked, carrying the pointer position; suppressed for the release that ended a drag. | - | packages/core/src/core/element.ts:142 |
click.x | number | X coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:144 |
click.y | number | Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:146 |
destroyed | null | Emitted when the element is destroyed; carries no payload. | EventMap.destroyed | packages/core/src/core/element.ts:186 |
detached | Group | Emitted when the element is detached from a parent Group, carrying the former parent group. | - | packages/core/src/core/element.ts:108 |
drag | object | Emitted continuously while dragging the element, carrying the current position, drag start, and total movement since the drag started. | - | packages/core/src/core/element.ts:156 |
drag.deltaX | number | Total horizontal distance moved since the drag started, in logical pixels. | - | packages/core/src/core/element.ts:166 |
drag.deltaY | number | Total vertical distance moved since the drag started, in logical pixels. | - | packages/core/src/core/element.ts:168 |
drag.startX | number | X coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:162 |
drag.startY | number | Y coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:164 |
drag.x | number | Current X coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:158 |
drag.y | number | Current Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:160 |
dragend | object | Emitted when a drag gesture on the element ends, carrying the final position, drag start, and total movement since the drag started. | - | packages/core/src/core/element.ts:171 |
dragend.deltaX | number | Total horizontal distance moved since the drag started, in logical pixels. | - | packages/core/src/core/element.ts:181 |
dragend.deltaY | number | Total vertical distance moved since the drag started, in logical pixels. | - | packages/core/src/core/element.ts:183 |
dragend.startX | number | X coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:177 |
dragend.startY | number | Y coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:179 |
dragend.x | number | Final X coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:173 |
dragend.y | number | Final Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:175 |
dragstart | object | Emitted when a drag gesture begins on the element, carrying the start position. | - | packages/core/src/core/element.ts:149 |
dragstart.x | number | X coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:151 |
dragstart.y | number | Y coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:153 |
graph | null | Emitted when the element tree changes, notifying the scene to rebuild its graph; carries no payload. | - | packages/core/src/core/element.ts:104 |
mousedown | object | Emitted when a pointer button is pressed over the element, carrying the pointer position. | - | packages/core/src/core/element.ts:128 |
mousedown.x | number | X coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:130 |
mousedown.y | number | Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:132 |
mouseenter | null | Emitted when the pointer enters the element; carries no payload. | - | packages/core/src/core/element.ts:117 |
mouseleave | null | Emitted when the pointer leaves the element; carries no payload. | - | packages/core/src/core/element.ts:119 |
mousemove | object | Emitted as the pointer moves over the element, carrying its position. | - | packages/core/src/core/element.ts:121 |
mousemove.x | number | X coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:123 |
mousemove.y | number | Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:125 |
mouseup | object | Emitted when a pointer button is released over the element, carrying the release position. | - | packages/core/src/core/element.ts:135 |
mouseup.x | number | X coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:137 |
mouseup.y | number | Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left). | - | packages/core/src/core/element.ts:139 |
updated | object | Emitted when a state value changes, carrying the affected key and its new value. | - | packages/core/src/core/element.ts:110 |
updated.key | PropertyKey | State property key that changed. | - | packages/core/src/core/element.ts:112 |
updated.value | unknown | New value assigned to the property. | - | packages/core/src/core/element.ts:114 |