Skip to content

Documentation / @ripl/core / ContextEventMap

Interface: ContextEventMap

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

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.-packages/core/src/context/types.ts:84
click.xnumberX coordinate of the pointer, in surface pixel space.-packages/core/src/context/types.ts:86
click.ynumberY coordinate of the pointer, in surface pixel space.-packages/core/src/context/types.ts:88
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 delta from the start.-packages/core/src/context/types.ts:98
drag.deltaXnumberHorizontal distance moved since the drag started, in pixels.-packages/core/src/context/types.ts:108
drag.deltaYnumberVertical distance moved since the drag started, in pixels.-packages/core/src/context/types.ts:110
drag.startXnumberX coordinate at which the drag started, in surface pixel space.-packages/core/src/context/types.ts:104
drag.startYnumberY coordinate at which the drag started, in surface pixel space.-packages/core/src/context/types.ts:106
drag.xnumberCurrent X coordinate of the pointer, in surface pixel space.-packages/core/src/context/types.ts:100
drag.ynumberCurrent Y coordinate of the pointer, in surface pixel space.-packages/core/src/context/types.ts:102
dragendobjectEmitted when a drag gesture ends, carrying the final position, drag start, and total delta.-packages/core/src/context/types.ts:113
dragend.deltaXnumberTotal horizontal distance moved over the drag, in pixels.-packages/core/src/context/types.ts:123
dragend.deltaYnumberTotal vertical distance moved over the drag, in pixels.-packages/core/src/context/types.ts:125
dragend.startXnumberX coordinate at which the drag started, in surface pixel space.-packages/core/src/context/types.ts:119
dragend.startYnumberY coordinate at which the drag started, in surface pixel space.-packages/core/src/context/types.ts:121
dragend.xnumberFinal X coordinate of the pointer, in surface pixel space.-packages/core/src/context/types.ts:115
dragend.ynumberFinal Y coordinate of the pointer, in surface pixel space.-packages/core/src/context/types.ts:117
dragstartobjectEmitted when a drag gesture begins, carrying the start position.-packages/core/src/context/types.ts:91
dragstart.xnumberX coordinate at which the drag started, in surface pixel space.-packages/core/src/context/types.ts:93
dragstart.ynumberY coordinate at which the drag started, in surface pixel space.-packages/core/src/context/types.ts:95
mouseenternullEmitted when the pointer enters the context surface.-packages/core/src/context/types.ts:73
mouseleavenullEmitted when the pointer leaves the context surface.-packages/core/src/context/types.ts:75
mousemoveobjectEmitted as the pointer moves over the surface, carrying its position.-packages/core/src/context/types.ts:77
mousemove.xnumberX coordinate of the pointer, in surface pixel space.-packages/core/src/context/types.ts:79
mousemove.ynumberY coordinate of the pointer, in surface pixel space.-packages/core/src/context/types.ts:81
resizenullEmitted when the context's rendering surface is resized.-packages/core/src/context/types.ts:71