Skip to content

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 ​

PropertyTypeDescriptionOverridesDefined in
attachedGroupEmitted when the element is attached to a parent Group, carrying that group.-packages/core/src/core/element.ts:106
clickobjectEmitted 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.xnumberX coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:144
click.ynumberY coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:146
destroyednullEmitted when the element is destroyed; carries no payload.EventMap.destroyedpackages/core/src/core/element.ts:186
detachedGroupEmitted when the element is detached from a parent Group, carrying the former parent group.-packages/core/src/core/element.ts:108
dragobjectEmitted 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.deltaXnumberTotal horizontal distance moved since the drag started, in logical pixels.-packages/core/src/core/element.ts:166
drag.deltaYnumberTotal vertical distance moved since the drag started, in logical pixels.-packages/core/src/core/element.ts:168
drag.startXnumberX 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.startYnumberY 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.xnumberCurrent 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.ynumberCurrent Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:160
dragendobjectEmitted 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.deltaXnumberTotal horizontal distance moved since the drag started, in logical pixels.-packages/core/src/core/element.ts:181
dragend.deltaYnumberTotal vertical distance moved since the drag started, in logical pixels.-packages/core/src/core/element.ts:183
dragend.startXnumberX 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.startYnumberY 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.xnumberFinal 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.ynumberFinal Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:175
dragstartobjectEmitted when a drag gesture begins on the element, carrying the start position.-packages/core/src/core/element.ts:149
dragstart.xnumberX 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.ynumberY 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
graphnullEmitted when the element tree changes, notifying the scene to rebuild its graph; carries no payload.-packages/core/src/core/element.ts:104
mousedownobjectEmitted when a pointer button is pressed over the element, carrying the pointer position.-packages/core/src/core/element.ts:128
mousedown.xnumberX coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:130
mousedown.ynumberY coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:132
mouseenternullEmitted when the pointer enters the element; carries no payload.-packages/core/src/core/element.ts:117
mouseleavenullEmitted when the pointer leaves the element; carries no payload.-packages/core/src/core/element.ts:119
mousemoveobjectEmitted as the pointer moves over the element, carrying its position.-packages/core/src/core/element.ts:121
mousemove.xnumberX coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:123
mousemove.ynumberY coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:125
mouseupobjectEmitted when a pointer button is released over the element, carrying the release position.-packages/core/src/core/element.ts:135
mouseup.xnumberX coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:137
mouseup.ynumberY coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/core/element.ts:139
updatedobjectEmitted when a state value changes, carrying the affected key and its new value.-packages/core/src/core/element.ts:110
updated.keyPropertyKeyState property key that changed.-packages/core/src/core/element.ts:112
updated.valueunknownNew value assigned to the property.-packages/core/src/core/element.ts:114