Class: SequenceComponent
component.SequenceComponent
classdesc
Component showing navigation arrows for sequence directions
as well as playing button. Exposes an API to start and stop play.
#
HierarchyComponent
<SequenceConfiguration
>↳
SequenceComponent
#
Constructors#
constructor• new SequenceComponent(name
, container
, navigator
, renderer?
, scheduler?
)
#
ParametersName | Type |
---|---|
name | string |
container | Container |
navigator | Navigator |
renderer? | SequenceDOMRenderer |
scheduler? | Scheduler |
#
Overrides#
Defined incomponent/sequence/SequenceComponent.ts:68
#
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/sequence/SequenceComponent.ts:165
• on(type
, handler
): void
Event fired when playing starts or stops.
example
// Initialize the viewervar viewer = new Viewer({ // viewer options });var component = viewer.getComponent('<component-name>');// Set an event listenercomponent.on('playing', function() { console.log("A playing event has occurred.");});
#
ParametersName | Type |
---|---|
type | "playing" |
handler | (event : ComponentPlayEvent ) => void |
#
Returnsvoid
#
Defined incomponent/sequence/SequenceComponent.ts:184
#
Properties#
componentNameâ–ª Static
componentName: ComponentName
= "sequence"
inheritdoc
#
Overrides#
Defined incomponent/sequence/SequenceComponent.ts:59
#
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 | SequenceConfiguration | Component configuration. |
#
Returnsvoid
#
Inherited from#
Defined in#
fireâ–¸ fire(type
, event
): void
#
ParametersName | Type |
---|---|
type | "hover" |
event | ComponentHoverEvent |
#
Returnsvoid
#
Overrides#
Defined incomponent/sequence/SequenceComponent.ts:120
â–¸ fire(type
, event
): void
#
ParametersName | Type |
---|---|
type | "playing" |
event | ComponentPlayEvent |
#
Returnsvoid
#
OverridesComponent.fire
#
Defined incomponent/sequence/SequenceComponent.ts:124
#
offâ–¸ off(type
, handler
): void
Unsubscribe from an event by its name.
#
ParametersName | Type |
---|---|
type | "hover" |
handler | (event : ComponentHoverEvent ) => void |
#
Returnsvoid
#
Overrides#
Defined incomponent/sequence/SequenceComponent.ts:135
â–¸ off(type
, handler
): void
#
ParametersName | Type |
---|---|
type | "playing" |
handler | (event : ComponentPlayEvent ) => void |
#
Returnsvoid
#
OverridesComponent.off
#
Defined incomponent/sequence/SequenceComponent.ts:139
#
playâ–¸ play(): void
Start playing.
fires
playing
#
Returnsvoid
#
Defined incomponent/sequence/SequenceComponent.ts:200
#
stopâ–¸ stop(): void
Stop playing.
fires
playing
#
Returnsvoid