Skip to content

Latest commit

 

History

History
183 lines (101 loc) · 4.68 KB

SvgLineAttributes.md

File metadata and controls

183 lines (101 loc) · 4.68 KB

transport-network-animator / SvgLineAttributes

Interface: 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" />

Hierarchy

Table of contents

Properties

Properties

animOrder

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

Defined in

svg/SvgApi.ts:177


beckStyle

beckStyle: boolean

Whether to use the "Harry Beck style" for this Line segment. If set to false, overrides Config.beckStyle.

SVG: data-beck-style

Defined in

svg/SvgApi.ts:184


from

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

Inherited from

SvgAbstractTimedDrawableAttributes.from

Defined in

svg/SvgApi.ts:31


name

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

Overrides

SvgAbstractTimedDrawableAttributes.name

Defined in

svg/SvgApi.ts:140


speed

speed: undefined | number

The animation speed of that Line segment. This overrides Config.animSpeed.

SVG: data-speed

Defined in

svg/SvgApi.ts:168


stops

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

Defined in

svg/SvgApi.ts:154


to

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

Inherited from

SvgAbstractTimedDrawableAttributes.to

Defined in

svg/SvgApi.ts:46


weight

weight: undefined | number

The graph weight of that Line segment, used for Gravitator.

data-weight

Defined in

svg/SvgApi.ts:161