API Docs for:
Show:

TimelineView Class

Module: modules

Template: timeline.html

Methods

animate

()

This method starts the animation of the timeline. The animation of the timeline is a set of consecutive seek invocation.

calculateSelectionChartPage

(
  • An
)
Integer

This method returns the page of the given event.

Parameters:

  • An Object

    instance of Event

Returns:

Integer: The number of the current page

checkSliderSelection

()

This method checks and prevents inconsistent selection of the Control Timeline.

confirmSlidersSelection

()

This method is triggered when a user changes the selection on the Control Timeline.

drawControlChart

()

This method draws the Control Timeline

drawIntervalOnSelectionCanvas

()

This method draws on the Selection Timeline an interval selected on the Control Timeline

drawSelectionChart

()

This method draws the Selection Timeline

getEventColor

(
  • The
)

This method provides a color for each type of event.

Parameters:

  • The String

    type of an event

getEventVerboseType

(
  • The
)

This method provides a description for each type of event.

Parameters:

  • The String

    type of an event

getNumberOfEventsBetween

(
  • A
  • A
)
Integer

This method returns the number of events occurring between two unix timestamps.

Parameters:

  • A Integer

    unix timestamp

  • A Integer

    unix timestamp

Returns:

Integer: The number of events

initialize

(
  • A
)

The initialization method of this object.

Parameters:

  • A Map

    map of parameters

logarithmicSeekTime

(
  • A
)
Float

This method is useful to calculate the duration for a seek operation with a logarithm approach.

Parameters:

  • A Float

    time interval

Returns:

Float: A time interval

manageSelectionChartArrows

()

This method manages the arrows useful to change the page of the Selection Timeline.

miniArrowsManager

()

This method manages the mini arrows. The mini arrows are the two green arrows that appear when the timeline sliders (selectors) disappear from the visible selection timeline.

nextEvent

(
  • An
  • If
)
Object

This method returns the next event in the timeline.

Parameters:

  • An Object

    instance of Instant

  • If Boolean

    this optional parameter is true then the next event will be the first of the next block

Returns:

Object: An instance of Event

nextSelectionChart

()

This method draws the next page of the Selection Timeline

prevSelectionChart

()

This method draws the previous page of the Selection Timeline

render

()

This method draws this module (eg. inject the DOM and elements).

scrollSelectionCanvas

(
  • An
)

This method auto-scrolls the Selection Canvas when the selected instant is represented close to a margin.

Parameters:

  • An Object

    instance of Instant

seek

(
  • An
  • The
)

This method manages the animation of the time cursor along the timeline.

Parameters:

  • An Object

    instance of Instant which will be the final position of the time cursor

  • The Float

    duration of the animation

selectionChartPages

() Array

This method creates an array of events each of which is the first of the related page.

Returns:

Array: Array of events

stopAnimation

()

This method stops a seek process

updateControlCanvas

()

This method updates the representation of the Control Timeline

updateCursorPosition

()

This method is triggered when a user clicks on the Control Timeline in order to change the current instant

updateSelectedEvent

()

This method is triggered when a user clicks on the Selection Timeline in order to change the current event

updateSelectionCanvas

()

This method updates the representation of the Selection Timeline

writeTimelineDate

()

This method prints information about the position of the time cursor.

writeTimelineInfo

(
  • Information
)

This method prints information about the timeline.

Parameters:

  • Information String