Timeline.LinearEther class

On a linear ether, equal pixel distances map to equal time spans, and equal time spans map to equal pixel distances.

Initialization

The constructor of Timeline.LinearEther takes an object whose fields (listed below) specify initialization settings for the ether.

interval
required, a number of milliseconds in some date/time interval. The interval is intentionally left unspecified for your discretion. For example, if you want to use the interval of a day, you can construct your initialization object as follows:
new Timeline.LinearEther({
    interval: 1000 * 60 * 60 * 24,
    ...
});
or in a more understandable manner,
new Timeline.LinearEther({
    interval: Timeline.DateTime.gregorianUnitLengths[Timeline.DateTime.DAY],
    ...
});
pixelsPerInterval
required, the number of pixels corresponding to the date/time interval above. Start off with 100 and then adjust to achieve the effect you want.
startsOn, endsOn, centersOn
optional. Any one of those fields can be specified to set (directly or indirectly) the origin of the ether. These can be String or Date objects; they are parsed using Timeline.DateTime.parseGregorianDateTime() into Date objects. If none of these fields is specified, the current date is used to center the ether.

Related Topics