cyclejs-community/cycle-canvas

Elements hierarchy meaning

ivan-kleshnin opened this issue · 1 comments

What element hierarchy is meant to represent?

In other words, how

rect({children: [
  rect({
    x: 10, y: 10, width: 160, height: 100,
    children: [
      text({x: 15, y: 25, ...})
    ]
  })
]})

is different from

rect({children: [
  rect({
    x: 10, y: 10, width: 160, height: 100,
  })
  text({x: 15, y: 25, ...})
]})

In DOM tree there is a particular meaning of node hierarchies described by "block model".
What it represents here?

  1. Some overlay rules?
  2. Grouping for transformations?
  3. User-level classification stuff?
  4. Nothing but reserved for future?

My original intention was to have children's position be relative to parents, to have a grouping structure similar to that of SVG.