edemaine / svgtiler

Tool for drawing diagrams on a grid, combining grids of SVGs into a big SVG figure
MIT License
61 stars 6 forks source link

Rename `data` to `keys` #88

Closed edemaine closed 2 years ago

edemaine commented 2 years ago

Currently, Drawing has an attribute called data which is an array of arrays of key strings. This name is pretty generic. keys seems more natural. (tiles should probably be reserved for the corresponding array of arrays of built Tile objects.)

This would be a breaking API change, so maybe for v3.

This breaks some symmetry. Currently both Mapping and Drawing objects have a data attribute. But they mean very different things, so should probably be renamed to map and keys respectively. And Style already doesn't have data; it uses css.