chiasm-project / chiasm-layout

Nested box layout for Chiasm components.
MIT License
4 stars 2 forks source link

Concise Syntax #6

Open curran opened 8 years ago

curran commented 8 years ago

(A-(B|(C-D)|E))

represents the same thing as

"layout": {
  "orientation": "vertical",
  "children": [
    "A",
    {
      "orientation": "horizontal",
      "children": [
        "B",
        {
          "orientation": "vertical",
          "children": [ "C", "D" ]
        },
        "E"
      ]
    }
  ]
}
curran commented 7 years ago

Perhaps better as A/(B+C/D+E). Then we can use order of operations from math!

curran commented 7 years ago

Started on this work https://bl.ocks.org/curran/aa1a9b08f246d4cbd0317b0229a21a72