|
| 1 | +--- |
| 2 | +title: Josh Horowitz 2/15/19 |
| 3 | +--- |
| 4 | + |
| 5 | +# Josh Horowitz 2/15/19 |
| 6 | + |
| 7 | +_Chat about layout_ |
| 8 | + |
| 9 | +- started with react and lots of math with x and y |
| 10 | +- render children and propogate back up, do it once for each layer |
| 11 | +- constraint-based |
| 12 | +- cassuary |
| 13 | +- don't need parent-child communication -> single place solves all constraints |
| 14 | +- he gave up on foreigntext in svg |
| 15 | +- browsers don't support svg consistently, especially with foreignobject |
| 16 | +- position html elements over svg works fine |
| 17 | +- cassuary replaces the need for svg g element because that handles layout |
| 18 | +- solvers usually have imperitive APIs so he built a declarative thing on top of cassuary (like react is for the dom) |
| 19 | +- cassuary is very limited. only linear equations and equalities, which means it can't do very much. only lay out things with the structure of trees. not force-directed graph layout. it can't tell you if two boxes overlap or not because that requires OR operator which it doesn't |
| 20 | +- could think of it as a tree with a few little loops (instead of a graph), so you think of it as a directed acyclic graph with a few extra arrows |
| 21 | +- layout problems very quickly become np complete because of the possibility explosion of ways to combine things |
| 22 | +- here are some parameters, here's a function of how good a layout is --> fiddle with the parameters until we optimize the "good" function |
| 23 | +- josh is skeptical it can do large complex layouts because it gets trapped in local minima. it runs itself into a weird corner |
| 24 | +- optimization problem |
| 25 | +- if it looks more like solving a suduku puzzle, it won't be magic |
| 26 | +- maybe machine learning would be relevant |
| 27 | +- could make a wormhole for arrows to hide the part that would overlap |
| 28 | +- graphviz -> there are papers that describe these algorithms |
| 29 | +- could do canvas and position html elements absolutely on top, but more work to handle mouse events |
| 30 | +- you can represent the network like a big graph, or use names, or the wormhole ideas |
| 31 | +- simple layout structures are more predictable for the user to anticipate and control, and won't be jarring when changes happen |
| 32 | +- could have layout be stateful/incremental so that things just change as little as possible based on how they are now |
0 commit comments