Tree data structure
paulgb opened this issue · comments
Aper should have a Tree
data structure that would represent nestable data structures, such as:
- Elements in a vector graphic that supports nested grouping (e.g. SVG, geojson)
- Comments in a threaded comment format
It should be possible to move elements from one section of the tree to another. In order to handle this nicely, it probably makes sense to have one "pool" for the Tree
, mapping uuids to interior state machines, and then have a nested structure of TreeNode
s that refer to those uuids. This means that we need to make sure loops are broken and (equivalently) that every node has a parent in the tree.