Skip to main content

Class: DirectionComponent

component.DirectionComponent

classdesc Component showing navigation arrows for steps and turns.

Hierarchy#

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.");});

Parameters#

NameType
type"hover"
handler(event: ComponentHoverEvent) => void

Returns#

void

Overrides#

Component.on

Defined in#

component/direction/DirectionComponent.ts:115

Properties#

componentName#

â–ª Static componentName: ComponentName = "direction"

inheritdoc

Overrides#

Component.componentName

Defined in#

component/direction/DirectionComponent.ts:43

Accessors#

activated#

• get activated(): boolean

Get activated.

Returns#

boolean

Value indicating if the component is currently active.

Defined in#

component/Component.ts:78


defaultConfiguration#

• get defaultConfiguration(): TConfiguration

Get default configuration.

Returns#

TConfiguration

Default configuration for component.

Defined in#

component/Component.ts:92


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#

component/Component.ts:107

Methods#

configure#

â–¸ configure(configuration): void

Configure the component.

Parameters#

NameTypeDescription
configurationDirectionConfigurationComponent configuration.

Returns#

void

Inherited from#

Component.configure

Defined in#

component/Component.ts:131


fire#

â–¸ fire(type, event): void

Parameters#

NameType
type"hover"
eventComponentHoverEvent

Returns#

void

Overrides#

Component.fire

Defined in#

../doc/component/direction/DirectionComponent.ts:70


off#

â–¸ off(type, handler): void

Unsubscribe from an event by its name.

Parameters#

NameType
type"hover"
handler(event: ComponentHoverEvent) => void

Returns#

void

Overrides#

Component.off

Defined in#

../doc/component/direction/DirectionComponent.ts:85