Skip to content

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

PropertyTypeDescriptionOverridesDefined in
attachedGroupEmitted when the element is attached to a parent Group, carrying that group.-packages/core/src/core/element.ts:113
clickobjectEmitted when the element is clicked, carrying the pointer position.-packages/core/src/core/element.ts:135
click.xnumberX coordinate of the pointer, in element-local space.-packages/core/src/core/element.ts:137
click.ynumberY coordinate of the pointer, in element-local space.-packages/core/src/core/element.ts:139
destroyednullEmitted when the element is destroyed; carries no payload.EventMap.destroyedpackages/core/src/core/element.ts:179
detachedGroupEmitted when the element is detached from a parent Group, carrying the former parent group.-packages/core/src/core/element.ts:115
dragobjectEmitted continuously while dragging the element, carrying the current position, drag start, and delta from the start.-packages/core/src/core/element.ts:149
drag.deltaXnumberHorizontal distance moved since the drag started, in pixels.-packages/core/src/core/element.ts:159
drag.deltaYnumberVertical distance moved since the drag started, in pixels.-packages/core/src/core/element.ts:161
drag.startXnumberX coordinate at which the drag started, in element-local space.-packages/core/src/core/element.ts:155
drag.startYnumberY coordinate at which the drag started, in element-local space.-packages/core/src/core/element.ts:157
drag.xnumberCurrent X coordinate of the pointer, in element-local space.-packages/core/src/core/element.ts:151
drag.ynumberCurrent Y coordinate of the pointer, in element-local space.-packages/core/src/core/element.ts:153
dragendobjectEmitted 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.deltaXnumberTotal horizontal distance moved over the drag, in pixels.-packages/core/src/core/element.ts:174
dragend.deltaYnumberTotal vertical distance moved over the drag, in pixels.-packages/core/src/core/element.ts:176
dragend.startXnumberX coordinate at which the drag started, in element-local space.-packages/core/src/core/element.ts:170
dragend.startYnumberY coordinate at which the drag started, in element-local space.-packages/core/src/core/element.ts:172
dragend.xnumberFinal X coordinate of the pointer, in element-local space.-packages/core/src/core/element.ts:166
dragend.ynumberFinal Y coordinate of the pointer, in element-local space.-packages/core/src/core/element.ts:168
dragstartobjectEmitted when a drag gesture begins on the element, carrying the start position.-packages/core/src/core/element.ts:142
dragstart.xnumberX coordinate at which the drag started, in element-local space.-packages/core/src/core/element.ts:144
dragstart.ynumberY coordinate at which the drag started, in element-local space.-packages/core/src/core/element.ts:146
graphnullEmitted when the element tree changes, notifying the scene to rebuild its graph; carries no payload.-packages/core/src/core/element.ts:111
mouseenternullEmitted when the pointer enters the element; carries no payload.-packages/core/src/core/element.ts:124
mouseleavenullEmitted when the pointer leaves the element; carries no payload.-packages/core/src/core/element.ts:126
mousemoveobjectEmitted as the pointer moves over the element, carrying its position.-packages/core/src/core/element.ts:128
mousemove.xnumberX coordinate of the pointer, in element-local space.-packages/core/src/core/element.ts:130
mousemove.ynumberY coordinate of the pointer, in element-local space.-packages/core/src/core/element.ts:132
updatedobjectEmitted when a state value changes, carrying the affected key and its new value.-packages/core/src/core/element.ts:117
updated.keyPropertyKeyState property key that changed.-packages/core/src/core/element.ts:119
updated.valueunknownNew value assigned to the property.-packages/core/src/core/element.ts:121