Commit 187ab55
fx_viewer: switch layout to fast-sugiyama with natural edge flow
Replace the vendored grandalf fork with the Rust-backed fast-sugiyama
package and rewrite the post-layout compaction in exporter.py to
produce a natural top-down edge flow.
Layout changes in _compute_layout_with_ext_lines / _compact_components:
- Drive layout via fast-sugiyama's from_edges + rect_pack_layouts.
- Run per-layer spine cohesion (chain detection across real and dummy
nodes, iterative mean-pull, pure-A overlap repair) so linear op
chains render as straight spines.
- Flip Phase 6's y so graph inputs / placeholders land at the top of
the canvas and outputs / sinks at the bottom.
- Anchor edge endpoints to the bottom-midpoint of the source and
top-midpoint of the target, giving each node a predictable dock.
Also refresh the README's dependency / layout section to point at
fast-sugiyama[all] and drop the grandalf install instructions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 144154a commit 187ab55
14 files changed
Lines changed: 342 additions & 3868 deletions
File tree
- devtools
- fx_viewer
- grandalf
- utils
- observatory
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
18 | 37 | | |
19 | 38 | | |
20 | 39 | | |
| |||
37 | 56 | | |
38 | 57 | | |
39 | 58 | | |
40 | | - | |
| 59 | + | |
| 60 | + | |
41 | 61 | | |
| 62 | + | |
42 | 63 | | |
43 | 64 | | |
44 | 65 | | |
| 66 | + | |
45 | 67 | | |
46 | | - | |
47 | | - | |
| 68 | + | |
| 69 | + | |
48 | 70 | | |
49 | 71 | | |
50 | 72 | | |
51 | | - | |
| 73 | + | |
52 | 74 | | |
53 | 75 | | |
54 | 76 | | |
| |||
0 commit comments