TimelineTimeContext
Defines and maintains global aspects of the visualization concerning the relations between time and pixels.
The TimelineTimeContext
instance (unique across a visualization) keeps the
main reference on how many pixels should be used to represent one second
though its timeToPixel
method. The attributes zoom
, offset
(i.e. from
origin) and visibleWidth
allow for navigating in time and for maintaining
view consistency upon the DOM structure (<svg>
and <g>
tags) created by
the registered tracks.
It also maintain an array of all references to LayerTimeContext
instances
to propagate to layers
, changes made on the time to pixel representation.
Constructor Summary
Public Constructor | ||
public |
constructor(pixelsPerSecond: Number, visibleWidth: Number) |
Member Summary
Public Members | ||
public get |
Returns the number of pixels per seconds including the current zoom value. |
|
public set |
Defines if the duration displayed by tracks should be maintained when their width is updated. |
|
public get |
Returns if the duration displayed by tracks should be maintained when their width is updated. |
|
public get |
Returns the current offset applied to the registered |
|
public set |
Sets the offset to apply to the registered |
|
public get |
Returns the number of pixels per seconds ignoring the current zoom value. |
|
public set |
Updates all the caracteristics of this object according to the new given value of pixels per seconds. |
|
public get |
Returns the time to pixel trasfert function. |
|
public get |
Returns the duration displayed by |
|
public set |
Sets the visible width of the |
|
public get |
Returns the visible width of the |
|
public get |
Returns the current zoom level applied to the whole visualization. |
|
public set |
Sets the zoom ratio for the whole visualization. |
Public Constructors
Public Members
public get computedPixelsPerSecond: Number source
Returns the number of pixels per seconds including the current zoom value.
public set maintainVisibleDuration: Boolean source
Defines if the duration displayed by tracks should be maintained when their width is updated.
public get maintainVisibleDuration: Number source
Returns if the duration displayed by tracks should be maintained when their width is updated.
public get offset: Number source
Returns the current offset applied to the registered Track
instances
from origin (in seconds).
public set offset: Number source
Sets the offset to apply to the registered Track
instances from origin
(in seconds).
public get pixelsPerSecond: Number source
Returns the number of pixels per seconds ignoring the current zoom value.