Updated Data model (markdown)

Azgaar 2021-09-18 16:13:53 +03:00
parent 683e958e0f
commit cf5d22973d

@ -225,13 +225,16 @@ Rivers data is stored as an unordered array of objects (so element id is _not_ t
## Markers [WIP] ## Markers [WIP]
Markers data is stored as an unordered array of objects (so element id is _not_ the array index). Object structure: Markers data is stored as an unordered array of objects (so element id is _not_ the array index). Object structure:
* `i`: `number` - marker id. `'marker' + i` is used as svg element id and marker reference in `notes` object * `i`: `number` - marker id. `'marker' + i` is used as svg element id and marker reference in `notes` object
* `icon`: `number` - unicode character * `icon`: `number` - Unicode character (usually an [emoji](https://emojipedia.org/)) to serve as an icon
* `type`: `string` - optional, used only for auto-generated markers
* `x`: `number` - marker x coordinate * `x`: `number` - marker x coordinate
* `y`: `number` - marker y coordinate * `y`: `number` - marker y coordinate
* `dx`: `number` - marker icon x shift * `type`: `string` - marker group, used for auto-generated markers. Optional
* `dy`: `number` - marker icon y shift * `size`: `number` - marker size in pixels. Optional, default value is `30px`
* `size`: `number` - marker icon size * `hidden`: `boolean`: `true` if marker should not be rendered. Optional, default is `false` (visible)
* `bare`: `boolean`: `true` if marker should be rendered without pin (bubble). Optional, default is `false` (pinned)
* `dx`: `number` - icon x shift percent. Optional, default is `50%` (center)
* `dy`: `number` - icon y shift percent. Optional, default s `50%` (center)
* `px`: `number` - icon font-size in pixels. Optional, default is `12px`
## Routes ## Routes
Routes data is not in data model, but can be retrieved directly from svg `routes` element and `pack.cells.roads` array. Routes data is not in data model, but can be retrieved directly from svg `routes` element and `pack.cells.roads` array.