Class: PointerComponent
component.PointerComponent
classdesc Component handling mouse, pen, and touch events for camera movement.
To retrive and use the mouse component
example
var viewer = new Viewer({ ... });
var pointerComponent = viewer.getComponent("pointer");Hierarchy#
Component<PointerConfiguration>↳
PointerComponent
Properties#
componentName#
â–ª Static componentName: ComponentName = "pointer"
inheritdoc
Overrides#
Defined in#
component/pointer/PointerComponent.ts:30
Accessors#
activated#
• get activated(): boolean
Get activated.
Returns#
boolean
Value indicating if the component is currently active.
Defined in#
defaultConfiguration#
• get defaultConfiguration(): TConfiguration
Get default configuration.
Returns#
TConfiguration
Default configuration for component.
Defined in#
dragPan#
• get dragPan(): DragPanHandler
Get drag pan.
Returns#
The drag pan handler.
Defined in#
component/pointer/PointerComponent.ts:93
earthControl#
• get earthControl(): EarthControlHandler
Get earth control.
Returns#
EarthControlHandler
The earth control handler.
Defined in#
component/pointer/PointerComponent.ts:102
name#
• get name(): string
Get name.
description The name of the component. Used when interacting with the
component through the Viewer's API.
Returns#
string
Defined in#
scrollZoom#
• get scrollZoom(): ScrollZoomHandler
Get scroll zoom.
Returns#
The scroll zoom handler.
Defined in#
component/pointer/PointerComponent.ts:111
touchZoom#
• get touchZoom(): TouchZoomHandler
Get touch zoom.
Returns#
The touch zoom handler.
Defined in#
component/pointer/PointerComponent.ts:120
Methods#
configure#
â–¸ configure(configuration): void
Configure the component.
Parameters#
| Name | Type | Description |
|---|---|---|
configuration | PointerConfiguration | Component configuration. |
Returns#
void
Inherited from#
Defined in#
fire#
â–¸ fire<T>(type, event): void
Type parameters#
| Name |
|---|
T |
Parameters#
| Name | Type |
|---|---|
type | ComponentEventType |
event | T |
Returns#
void
Inherited from#
Defined in#
off#
â–¸ off<T>(type, handler): void
Unsubscribe from an event by its name.
Type parameters#
| Name |
|---|
T |
Parameters#
| Name | Type | Description |
|---|---|---|
type | ComponentEventType | The name of the event to unsubscribe from. |
handler | (event: T) => void | The handler to remove. |
Returns#
void
Inherited from#
Defined in#
on#
â–¸ on<T>(type, handler): void
Subscribe to an event by its name.
Type parameters#
| Name |
|---|
T |
Parameters#
| Name | Type | Description |
|---|---|---|
type | ComponentEventType | The name of the event to subscribe to. |
handler | (event: T) => void | The handler called when the event occurs. |
Returns#
void