Class: Component<TConfiguration>
component.Component
Type parameters#
| Name | Type |
|---|---|
TConfiguration | extends ComponentConfiguration |
Hierarchy#
↳
Component↳↳
BearingComponent↳↳
CacheComponent↳↳
DirectionComponent↳↳
KeyboardComponent↳↳
MarkerComponent↳↳
PointerComponent↳↳
PopupComponent↳↳
SequenceComponent↳↳
SliderComponent↳↳
SpatialComponent↳↳
TagComponent↳↳
ZoomComponent
Implements#
Constructors#
constructor#
• new Component<TConfiguration>(name, container, navigator)
Type parameters#
| Name | Type |
|---|---|
TConfiguration | extends ComponentConfiguration |
Parameters#
| Name | Type |
|---|---|
name | string |
container | Container |
navigator | Navigator |
Overrides#
Defined in#
Properties#
componentName#
â–ª Static componentName: ComponentName | FallbackComponentName
Defined in#
Accessors#
activated#
• get activated(): boolean
Get activated.
Returns#
boolean
Value indicating if the component is currently active.
Implementation of#
Defined in#
defaultConfiguration#
• get defaultConfiguration(): TConfiguration
Get default configuration.
Returns#
TConfiguration
Default configuration for component.
Implementation of#
IComponent.defaultConfiguration
Defined in#
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
Implementation of#
Defined in#
Methods#
configure#
â–¸ configure(configuration): void
Configure the component.
Parameters#
| Name | Type | Description |
|---|---|---|
configuration | TConfiguration | Component configuration. |
Returns#
void
Implementation of#
Defined in#
fire#
â–¸ fire<T>(type, event): void
inheritdoc
Type parameters#
| Name |
|---|
T |
Parameters#
| Name | Type |
|---|---|
type | ComponentEventType |
event | T |
Returns#
void
Overrides#
EventEmitter.fire
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
Overrides#
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