Class: KeyboardComponent
component.KeyboardComponent
classdesc Component for keyboard event handling.
To retrive and use the keyboard component
example
var viewer = new Viewer({ ... });
var keyboardComponent = viewer.getComponent("keyboard");Hierarchy#
Component<KeyboardConfiguration>↳
KeyboardComponent
Properties#
componentName#
â–ª Static componentName: ComponentName = "keyboard"
Overrides#
Defined in#
component/keyboard/KeyboardComponent.ts:29
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#
keyPlay#
• get keyPlay(): KeyPlayHandler
Get key play.
Returns#
The key play handler.
Defined in#
component/keyboard/KeyboardComponent.ts:76
keySequenceNavigation#
• get keySequenceNavigation(): KeySequenceNavigationHandler
Get key sequence navigation.
Returns#
The key sequence navigation handler.
Defined in#
component/keyboard/KeyboardComponent.ts:85
keySpatialNavigation#
• get keySpatialNavigation(): KeySpatialNavigationHandler
Get spatial.
Returns#
The spatial handler.
Defined in#
component/keyboard/KeyboardComponent.ts:94
keyZoom#
• get keyZoom(): KeyZoomHandler
Get key zoom.
Returns#
The key zoom handler.
Defined in#
component/keyboard/KeyboardComponent.ts:103
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#
Methods#
configure#
â–¸ configure(configuration): void
Configure the component.
Parameters#
| Name | Type | Description |
|---|---|---|
configuration | KeyboardConfiguration | 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