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");
#
HierarchyComponent
<PointerConfiguration
>↳
PointerComponent
#
Properties#
componentNameâ–ª Static
componentName: ComponentName
= "pointer"
inheritdoc
#
Overrides#
Defined incomponent/pointer/PointerComponent.ts:30
#
Accessors#
activated• get
activated(): boolean
Get activated.
#
Returnsboolean
Value indicating if the component is currently active.
#
Defined in#
defaultConfiguration• get
defaultConfiguration(): TConfiguration
Get default configuration.
#
ReturnsTConfiguration
Default configuration for component.
#
Defined in#
dragPan• get
dragPan(): DragPanHandler
Get drag pan.
#
ReturnsThe drag pan handler.
#
Defined incomponent/pointer/PointerComponent.ts:93
#
earthControl• get
earthControl(): EarthControlHandler
Get earth control.
#
ReturnsEarthControlHandler
The earth control handler.
#
Defined incomponent/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.
#
Returnsstring
#
Defined in#
scrollZoom• get
scrollZoom(): ScrollZoomHandler
Get scroll zoom.
#
ReturnsThe scroll zoom handler.
#
Defined incomponent/pointer/PointerComponent.ts:111
#
touchZoom• get
touchZoom(): TouchZoomHandler
Get touch zoom.
#
ReturnsThe touch zoom handler.
#
Defined incomponent/pointer/PointerComponent.ts:120
#
Methods#
configureâ–¸ configure(configuration
): void
Configure the component.
#
ParametersName | Type | Description |
---|---|---|
configuration | PointerConfiguration | Component configuration. |
#
Returnsvoid
#
Inherited from#
Defined in#
fireâ–¸ fire<T
>(type
, event
): void
#
Type parametersName |
---|
T |
#
ParametersName | Type |
---|---|
type | ComponentEventType |
event | T |
#
Returnsvoid
#
Inherited from#
Defined in#
offâ–¸ off<T
>(type
, handler
): void
Unsubscribe from an event by its name.
#
Type parametersName |
---|
T |
#
ParametersName | Type | Description |
---|---|---|
type | ComponentEventType | The name of the event to unsubscribe from. |
handler | (event : T ) => void | The handler to remove. |
#
Returnsvoid
#
Inherited from#
Defined in#
onâ–¸ on<T
>(type
, handler
): void
Subscribe to an event by its name.
#
Type parametersName |
---|
T |
#
ParametersName | Type | Description |
---|---|---|
type | ComponentEventType | The name of the event to subscribe to. |
handler | (event : T ) => void | The handler called when the event occurs. |
#
Returnsvoid