Skip to main content

TimelineTool

geovisto-mapReadme | API


geovisto-map / TimelineTool

Class: TimelineTool

This intreface declares the marker layer.

Author

Krystof Rykala

Extends

Implements

Constructors

new TimelineTool()

new TimelineTool(props?): TimelineTool

Parameters

props?: ITimelineToolProps

Returns

TimelineTool

Overrides

AbstractLayerTool.constructor

Source

tools/timeline/model/internal/tool/TimelineTool.ts:36

Properties

data

private data: TimeData

Source

tools/timeline/model/internal/tool/TimelineTool.ts:26


initialData

private initialData: undefined | IMapData

Source

tools/timeline/model/internal/tool/TimelineTool.ts:27


mapForm

private mapForm: IMapForm

Source

tools/timeline/model/internal/tool/TimelineTool.ts:21


timelineControl

private timelineControl: null | TimelineControl = null

Source

tools/timeline/model/internal/tool/TimelineTool.ts:23


timelineService?

private optional timelineService: TimelineService

Source

tools/timeline/model/internal/tool/TimelineTool.ts:22


times

private times: number[] = []

Source

tools/timeline/model/internal/tool/TimelineTool.ts:25

Methods

calculateTimes()

private calculateTimes(timePath, timeGranularity?): number[]

Parameters

timePath: string

timeGranularity?: ITimeGranularity

Returns

number[]

Source

tools/timeline/model/internal/tool/TimelineTool.ts:110


copy()

copy(): ITimelineTool\<ITimelineToolProps, ITimelineToolDefaults, ITimelineToolState\<ITimelineToolProps, ITimelineToolDefaults, ITimelineToolConfig, ITimelineToolDimensionsConfig, object>, ITimelineToolConfig, IMapToolInitProps\<ITimelineToolConfig>>

It creates a copy of the uninitialized tool.

Returns

ITimelineTool\<ITimelineToolProps, ITimelineToolDefaults, ITimelineToolState\<ITimelineToolProps, ITimelineToolDefaults, ITimelineToolConfig, ITimelineToolDimensionsConfig, object>, ITimelineToolConfig, IMapToolInitProps\<ITimelineToolConfig>>

Implementation of

ITimelineTool.copy

Overrides

AbstractLayerTool.copy

Source

tools/timeline/model/internal/tool/TimelineTool.ts:46


create()

create(): this

It creates new layer with respect to configuration

Returns

this

Implementation of

ITimelineTool.create

Inherited from

AbstractLayerTool.create

Source

model/internal/layer/AbstractLayerTool.ts:89


createData()

private createData(timePath, chartConfig?): object

Parameters

timePath: string

chartConfig?

chartConfig.chartAggregationFn?: string

chartConfig.chartValuePath?: undefined | string

Returns

object

charts?

optional charts: object[]

values

values: Map\<number, Record\<string, unknown>[]>

Source

tools/timeline/model/internal/tool/TimelineTool.ts:153


createDefaults()

protected createDefaults(): ITimelineToolDefaults

It creates new defaults of the tool.

Returns

ITimelineToolDefaults

Overrides

AbstractLayerTool.createDefaults

Source

tools/timeline/model/internal/tool/TimelineTool.ts:67


createLayerItems()

protected createLayerItems(): Layer[]

It creates layer items.

Returns

Layer[]

Overrides

AbstractLayerTool.createLayerItems

Source

tools/timeline/model/internal/tool/TimelineTool.ts:32


createMapForm()

protected createMapForm(): IMapForm

It creates new tab control.

Returns

IMapForm

Source

tools/timeline/model/internal/tool/TimelineTool.ts:95


createState()

protected createState(): ITimelineToolState\<ITimelineToolProps, ITimelineToolDefaults, ITimelineToolConfig, ITimelineToolDimensionsConfig, object>

It returns default tool state.

Returns

ITimelineToolState\<ITimelineToolProps, ITimelineToolDefaults, ITimelineToolConfig, ITimelineToolDimensionsConfig, object>

Overrides

AbstractLayerTool.createState

Source

tools/timeline/model/internal/tool/TimelineTool.ts:81


destroyTimeline()

destroyTimeline(): void

Returns

void

Implementation of

ITimelineTool.destroyTimeline

Source

tools/timeline/model/internal/tool/TimelineTool.ts:263


getAPIGetter()

getAPIGetter(): undefined | IMapToolAPIGetter

It returns the tool API

Returns

undefined | IMapToolAPIGetter

Implementation of

ITimelineTool.getAPIGetter

Inherited from

AbstractLayerTool.getAPIGetter

Source

model/internal/tool/MapTool.ts:74


getDefaults()

getDefaults(): ITimelineToolDefaults

It returns default values of the state properties.

Returns

ITimelineToolDefaults

Implementation of

ITimelineTool.getDefaults

Overrides

AbstractLayerTool.getDefaults

Source

tools/timeline/model/internal/tool/TimelineTool.ts:60


getId()

getId(): string

Help function which returns the id of the object.

Returns

string

Implementation of

ITimelineTool.getId

Inherited from

AbstractLayerTool.getId

Source

model/internal/object/MapObject.ts:93


getLayerItems()

getLayerItems(): Layer[]

It returns layer items which should be rendered.

Returns

Layer[]

Implementation of

ITimelineTool.getLayerItems

Inherited from

AbstractLayerTool.getLayerItems

Source

model/internal/layer/AbstractLayerTool.ts:163


getMap()

getMap(): undefined | IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Help function returns map which uses this tool.

Do not override this function. Use the state class instead.

Returns

undefined | IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Implementation of

ITimelineTool.getMap

Inherited from

AbstractLayerTool.getMap

Source

model/internal/tool/MapTool.ts:112


getMapForm()

getMapForm(): IMapForm

It returns a map control.

Returns

IMapForm

Implementation of

IMapFormControl.getMapForm

Source

tools/timeline/model/internal/tool/TimelineTool.ts:85


getProps()

getProps(): ITimelineToolProps

It returns the props given by the programmer.

Returns

ITimelineToolProps

Implementation of

ITimelineTool.getProps

Overrides

AbstractLayerTool.getProps

Source

tools/timeline/model/internal/tool/TimelineTool.ts:53


getState()

getState(): ITimelineToolState\<ITimelineToolProps, ITimelineToolDefaults, ITimelineToolConfig, ITimelineToolDimensionsConfig, object>

It returns the layer tool state.

Returns

ITimelineToolState\<ITimelineToolProps, ITimelineToolDefaults, ITimelineToolConfig, ITimelineToolDimensionsConfig, object>

Implementation of

ITimelineTool.getState

Overrides

AbstractLayerTool.getState

Source

tools/timeline/model/internal/tool/TimelineTool.ts:74


getType()

getType(): string

Help function which returns the type of the object.

Returns

string

Implementation of

ITimelineTool.getType

Inherited from

AbstractLayerTool.getType

Source

model/internal/object/MapObject.ts:86


handleCurrentTimeChange()

private handleCurrentTimeChange(__namedParameters): void

Parameters

__namedParameters

__namedParameters.currentTimeIndex: number

__namedParameters.story: undefined | StoryState

Returns

void

Source

tools/timeline/model/internal/tool/TimelineTool.ts:131


handleEvent()

handleEvent(event): void

This function is called when a custom event is invoked.

Override this function, if needed.

Parameters

event: IMapEvent\<IMapObject\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectState\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>>

Returns

void

Overrides

AbstractLayerTool.handleEvent

Source

tools/timeline/model/internal/tool/TimelineTool.ts:276


handleStoryChange()

private handleStoryChange(storyConfig): void

Parameters

storyConfig: Story

Returns

void

Source

tools/timeline/model/internal/tool/TimelineTool.ts:188


hideLayerItems()

protected hideLayerItems(): void

Help function which hides layer items

This function is meant to be private.

Returns

void

Inherited from

AbstractLayerTool.hideLayerItems

Source

model/internal/layer/AbstractLayerTool.ts:147


initialize()

initialize(initProps): this

Overrides the super method.

Parameters

initProps: IMapToolInitProps\<ITimelineToolConfig>

Returns

this

Implementation of

ITimelineTool.initialize

Overrides

AbstractLayerTool.initialize

Source

tools/timeline/model/internal/tool/TimelineTool.ts:104


initializeTimeline()

initializeTimeline(): void

Returns

void

Implementation of

ITimelineTool.initializeTimeline

Source

tools/timeline/model/internal/tool/TimelineTool.ts:198


isEnabled()

isEnabled(): boolean

Help getter which returns enabled property of state.

Do not override this function. Use the state class instead.

Returns

boolean

Implementation of

ITimelineTool.isEnabled

Inherited from

AbstractLayerTool.isEnabled

Source

model/internal/tool/MapTool.ts:130


isSingleton()

isSingleton(): boolean

Help getter which returns a logtical value whether the tool type is singleton.

Returns

boolean

Implementation of

ITimelineTool.isSingleton

Inherited from

AbstractLayerTool.isSingleton

Source

model/internal/tool/MapTool.ts:81


render()

render(type, animateOptions?): void

It reloads data and redraw the layer with respect to the type.

By default it works with LayerRedrawType

Parameters

type: number

animateOptions?: IDataChangeAnimateOptions

Returns

void

Implementation of

ITimelineTool.render

Inherited from

AbstractLayerTool.render

Source

model/internal/layer/AbstractLayerTool.ts:189


setEnabled()

setEnabled(enabled): void

It changes layer state to enabled/disabled.

Parameters

enabled: boolean

Returns

void

Implementation of

ITimelineTool.setEnabled

Inherited from

AbstractLayerTool.setEnabled

Source

model/internal/layer/AbstractLayerTool.ts:102


setProps()

protected setProps(props): void

It updates the props.

Parameters

props: IMapObjectProps

Returns

void

Inherited from

AbstractLayerTool.setProps

Source

model/internal/object/MapObject.ts:38


showLayerItems()

protected showLayerItems(): void

Help function which shows layer items.

This function is meant to be private.

Returns

void

Inherited from

AbstractLayerTool.showLayerItems

Source

model/internal/layer/AbstractLayerTool.ts:126


switchEnabled()

switchEnabled(): void

Help function which switches enabled state (enabled/disabled).

Do not override this function. Use setEnabled instead.

Returns

void

Implementation of

ITimelineTool.switchEnabled

Inherited from

AbstractLayerTool.switchEnabled

Source

model/internal/tool/MapTool.ts:158


updateDimension()

updateDimension(dimension, value, renderType): void

It updates the dimension.

Parameters

dimension: IMapDimension\<unknown>

value: string

renderType: undefined | number= undefined

Returns

void

Implementation of

ITimelineTool.updateDimension

Inherited from

AbstractLayerTool.updateDimension

Source

model/internal/layer/AbstractLayerTool.ts:205