transport-network-animator / SvgLineAttributes
An animated Line.
SVG: path
example
<path data-line="IR2013" data-stops="- Bern Olten Liestal BaselSBB" data-from="2022 0 noanim-nozoom" data-to="2022 120 noanim-nozoom" data-speed="300" />
-
SvgAbstractTimedDrawableAttributes
↳
SvgLineAttributes
• animOrder: undefined
| Rotation
If set, indicates the geographical animation order, e.g. from north to south,
instead of animating elements with the same name and for the same Instant by the order in which they appear in the SVG.
e.g. n
, sw
.
SVG: data-anim-order
• beckStyle: boolean
Whether to use the "Harry Beck style" for this Line segment. If set to false, overrides Config.beckStyle.
SVG: data-beck-style
• from: Instant
Indicates when this element shall appear.
Pattern: (?<epoch>\d+) (?<second>\d+)(?<flag> [\w-]+)?
e.g. 2020 5 noanim-nozoom
epoch
: Epochs will be executed in order. Years can be used as epochs.
second
: Seconds reset to 0 with every epoch.
flag
: Optional. reverse
, noanim
, nozoom
, keepzoom
. Can be combined with -
.
See further explanations in root Readme.
SVG: data-from
SvgAbstractTimedDrawableAttributes.from
• name: string
The name. In certain circumstances, this will be used a grouping identifier. Attention: The SVG attribute is different for Lines!
Required.
SVG: data-line
SvgAbstractTimedDrawableAttributes.name
• speed: undefined
| number
The animation speed of that Line segment. This overrides Config.animSpeed.
SVG: data-speed
• stops: Stop
[]
A space-separated list of Station identifiers, and, optionally, a preceding track info.
Pattern: ((?<trackInfo>[-+]\d*\*? )?(?<stationId>\w+( |$)))+
e.g. +1 Frankfurt - Hannover +2* Berlin
stationId
: The identifier of a station defined elsewhere in the SVG (SvgStationAttributes.id).
trackInfo
: see https://github.com/traines-source/transport-network-animator#tracks
Required.
SVG: data-stops
• to: Instant
Indicates when this element shall disappear.
Pattern: (?<epoch>\d+) (?<second>\d+)(?<flag> [\w-]+)?
e.g. 2020 5 noanim-nozoom
epoch
: Epochs will be executed in order. Years can be used as epochs.
second
: Seconds reset to 0 with every epoch.
flag
: Optional. reverse
, noanim
, nozoom
, keepzoom
. Can be combined with -
.
See further explanations in root Readme.
SVG: data-to
SvgAbstractTimedDrawableAttributes.to
• weight: undefined
| number
The graph weight of that Line segment, used for Gravitator.
data-weight