diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-10-12 22:32:06 +0200 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-10-12 22:32:09 +0200 |
| commit | 1bce88f12244564a45a3aefa3bf51974fda4b4f4 (patch) | |
| tree | f69c8e21caf67be136ede3e456ae8c7cf50bb900 /server/book-export | |
| parent | 127124fabf23e2dcb13326ed633e741fa9d7db16 (diff) | |
| download | hurrycurry-1bce88f12244564a45a3aefa3bf51974fda4b4f4.tar hurrycurry-1bce88f12244564a45a3aefa3bf51974fda4b4f4.tar.bz2 hurrycurry-1bce88f12244564a45a3aefa3bf51974fda4b4f4.tar.zst | |
reimplement diagram layouting
Diffstat (limited to 'server/book-export')
| -rw-r--r-- | server/book-export/src/diagram_svg.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/book-export/src/diagram_svg.rs b/server/book-export/src/diagram_svg.rs index d006ce78..a9a2c0a6 100644 --- a/server/book-export/src/diagram_svg.rs +++ b/server/book-export/src/diagram_svg.rs @@ -106,7 +106,7 @@ fn node_edge_connect_pos(src: &DiagramNode, dst: &DiagramNode) -> Vec2 { ) { src.position + dir * HSIZE // circle } else { - src.position + dir / dir.y.abs() * HSIZE // square (only +Y and -Y sides) + src.position + dir / dir.y.abs().max(dir.x.abs()) * HSIZE // square (only +Y and -Y sides) } } |