ScreenSpaceEvent
ScreenSpaceEvent is an event callback for mouse or touch interactions.
See also: ScreenSpaceEventHandler#setInputAction
- Example: ScreenSpaceEvent
Availability
Section titled “Availability”Only inside ScreenSpaceEventHandler.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
| action | ((e: { position: Cartesian2; } | { startPosition: Cartesian2; endPosition: Cartesian2; }) => void) | undefined | If empty, the event will be removed even if there is the default event. |
| modifier | KeyboardEventModifier | KeyboardEventModifier[] | undefined | Keyboard modifier(s) that must be held for the action to fire.- Single value (KeyboardEventModifier.ALT): action fires when only that modifier is held.- Array ([ALT, SHIFT]): chord — action fires only when all listed modifiers are held simultaneously.Multi-key chords require Cesium 1.142+. Content-equal but reference-fresh arrays do not retrigger the underlying setInputAction call. |
| type | ScreenSpaceEventType |