-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
At the moment, creating a grid puts every node in a straight line, from left to right. While this is a decent first step, we need a better algorithm for laying things out. So something like, if a region becomes too wide, see if the children can be put vertically stacked as well. This can be recursive too, so regions with many nodes can layout their individual areas but far higher up the tree it doesn't have to be adjusted.
This is kind of difficult to explain, so consider the following example. This graph:
┌─────────────────────────┐
┌───┐ │ ┌───┐ ┌───┐ ┌───┐ ┌───┐ │
│ A │ │ │ P │ │ Q │ │ R │ │ S │ │
└───┘ │ └───┘ └───┘ └───┘ └───┘ │
└─────────────────────────┘
might be better off being drawn as
┌─────────────┐
┌───┐ │ ┌───┐ ┌───┐ │
│ A │ │ │ P │ │ Q │ │
└───┘ │ └───┘ └───┘ │
│ ┌───┐ ┌───┐ │
│ │ R │ │ S │ │
│ └───┘ └───┘ │
└─────────────┘
While this is too small of an example to really highlight why vertical stacking could be important, I hope it illustrates what I mean.
Reactions are currently unavailable