Class: DirectionComponent
component.DirectionComponent
classdesc
Component showing navigation arrows for steps and turns.
#
HierarchyComponent
<DirectionConfiguration
>↳
DirectionComponent
#
Events#
on• on(type
, handler
): void
Fired when the hovered element of a component changes.
example
// Initialize the viewervar viewer = new Viewer({ // viewer options });var component = viewer.getComponent('<component-name>');// Set an event listenercomponent.on('hover', function() { console.log("A hover event has occurred.");});
#
ParametersName | Type |
---|---|
type | "hover" |
handler | (event : ComponentHoverEvent ) => void |
#
Returnsvoid
#
Overrides#
Defined incomponent/direction/DirectionComponent.ts:115
#
Properties#
componentNameâ–ª Static
componentName: ComponentName
= "direction"
inheritdoc
#
Overrides#
Defined incomponent/direction/DirectionComponent.ts:43
#
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#
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#
Methods#
configureâ–¸ configure(configuration
): void
Configure the component.
#
ParametersName | Type | Description |
---|---|---|
configuration | DirectionConfiguration | Component configuration. |
#
Returnsvoid
#
Inherited from#
Defined in#
fireâ–¸ fire(type
, event
): void
#
ParametersName | Type |
---|---|
type | "hover" |
event | ComponentHoverEvent |
#
Returnsvoid
#
Overrides#
Defined in../doc/component/direction/DirectionComponent.ts:70
#
offâ–¸ off(type
, handler
): void
Unsubscribe from an event by its name.
#
ParametersName | Type |
---|---|
type | "hover" |
handler | (event : ComponentHoverEvent ) => void |
#
Returnsvoid