Skip to content

Documentation / @ripl/core / ContextEventMap

Interface: ContextEventMap ​

Defined in: packages/core/src/context/types.ts:73

Event map for a rendering context, including resize and pointer events.

Extends ​

Indexable ​

[key: string]: unknown

Properties ​

PropertyTypeDescriptionInherited fromDefined in
clickobjectEmitted when the surface is clicked, carrying the pointer position; suppressed for the release that ended a drag.-packages/core/src/context/types.ts:104
click.xnumberX coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:106
click.ynumberY coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:108
destroyednullEmitted when the event bus is destroyed; carries no payload.EventMap.destroyedpackages/core/src/core/event-bus.ts:21
dragobjectEmitted continuously during a drag, carrying the current position, drag start, and total movement since the drag started.-packages/core/src/context/types.ts:118
drag.deltaXnumberTotal horizontal distance moved since the drag started, in logical pixels.-packages/core/src/context/types.ts:128
drag.deltaYnumberTotal vertical distance moved since the drag started, in logical pixels.-packages/core/src/context/types.ts:130
drag.startXnumberX coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:124
drag.startYnumberY coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:126
drag.xnumberCurrent X coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:120
drag.ynumberCurrent Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:122
dragendobjectEmitted when a drag gesture ends, carrying the final position, drag start, and total movement since the drag started.-packages/core/src/context/types.ts:133
dragend.deltaXnumberTotal horizontal distance moved since the drag started, in logical pixels.-packages/core/src/context/types.ts:143
dragend.deltaYnumberTotal vertical distance moved since the drag started, in logical pixels.-packages/core/src/context/types.ts:145
dragend.startXnumberX coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:139
dragend.startYnumberY coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:141
dragend.xnumberFinal X coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:135
dragend.ynumberFinal Y coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:137
dragstartobjectEmitted when a drag gesture begins, carrying the start position.-packages/core/src/context/types.ts:111
dragstart.xnumberX coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:113
dragstart.ynumberY coordinate at which the drag started, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:115
mousedownobjectEmitted when a pointer button is pressed over the surface, carrying the pointer position.-packages/core/src/context/types.ts:90
mousedown.xnumberX coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:92
mousedown.ynumberY coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:94
mouseenternullEmitted when the pointer enters the context surface.-packages/core/src/context/types.ts:79
mouseleavenullEmitted when the pointer leaves the context surface.-packages/core/src/context/types.ts:81
mousemoveobjectEmitted as the pointer moves over the surface, carrying its position.-packages/core/src/context/types.ts:83
mousemove.xnumberX coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:85
mousemove.ynumberY coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:87
mouseupobjectEmitted when a pointer button is released, carrying the release position; fires once per button press, even when the release lands outside the surface.-packages/core/src/context/types.ts:97
mouseup.xnumberX coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:99
mouseup.ynumberY coordinate of the pointer, in logical space (CSS pixels relative to the context's top-left).-packages/core/src/context/types.ts:101
rendernullEmitted to request that the bound scene repaint on the next frame, for context-level changes (e.g. a 3D camera move) that mutate no element.-packages/core/src/context/types.ts:77
resizenullEmitted when the context's rendering surface is resized.-packages/core/src/context/types.ts:75