Gavin Nishizawa
186a90de7b
fix, cleanup, test grid layout cuts
2023-06-08 13:11:31 -07:00
Gavin Nishizawa
70cbe99302
fix
2023-06-08 13:11:30 -07:00
Gavin Nishizawa
4015a48664
fix dagre shifting connection start past 2nd point
2023-06-02 15:52:06 -07:00
Gavin Nishizawa
176df52cec
fix grid icon positioning
2023-05-30 13:32:08 -07:00
Gavin Nishizawa
ad44eff47a
cleanup
2023-05-30 11:28:14 -07:00
Gavin Nishizawa
6d8dde153e
adjust grid for outside top labels
2023-05-30 11:08:05 -07:00
Gavin Nishizawa
297819dc35
grid: don't overwrite nested graph label positions
2023-05-30 11:06:56 -07:00
Gavin Nishizawa
182af8dc39
comments, renaming
2023-05-26 12:37:51 -07:00
Gavin Nishizawa
d06d797025
refactor/cleanup
2023-05-25 19:14:11 -07:00
Gavin Nishizawa
ee70180a87
fixes
2023-05-25 18:35:58 -07:00
Gavin Nishizawa
c3a3454353
elk
2023-05-25 16:22:04 -07:00
Gavin Nishizawa
6fc9ffa04d
fixes, cleanup
2023-05-24 20:07:10 -07:00
Gavin Nishizawa
6f9ad8d6dd
fix tracing edge to multiple/3d border
2023-05-24 20:07:10 -07:00
Gavin Nishizawa
3ce0b1439e
shift descendants
2023-05-24 20:07:10 -07:00
Gavin Nishizawa
d6b8149073
adjust for 3d/multiple
2023-05-24 20:07:10 -07:00
Gavin Nishizawa
7f1bfff6f2
changelog
2023-05-10 17:24:57 -07:00
Gavin Nishizawa
0750d1b3b2
also use grid-gap for grid container padding
2023-05-10 15:23:13 -07:00
Gavin Nishizawa
aff2c5c68e
layout nested grids
2023-05-10 12:57:38 -07:00
Gavin Nishizawa
939eb500da
layout nested grids
2023-05-10 12:57:07 -07:00
Gavin Nishizawa
f64588ff89
cleanup
2023-05-09 18:09:39 -07:00
Gavin Nishizawa
595cdd4b0b
improve layoutDynamic performance when evenly sized
2023-05-09 18:09:38 -07:00
Gavin Nishizawa
45d798dc53
simplify func
2023-05-04 20:58:39 -07:00
Gavin Nishizawa
d116f7d918
size grid container according to shape
2023-05-04 16:40:59 -07:00
Alexander Wang
e93682d7f5
fix elk issue when container named root
...
changelog
2023-04-29 20:27:33 -07:00
Gavin Nishizawa
6d54377fe1
cleanup
2023-04-28 19:50:04 -07:00
Gavin Nishizawa
0f0dd7744a
fast attempt with debt balancing + skip bad rows
2023-04-28 19:50:04 -07:00
Gavin Nishizawa
917b262773
add maximum attempts
2023-04-28 19:50:04 -07:00
Gavin Nishizawa
203cc5e4af
optimizations
2023-04-28 19:50:03 -07:00
Gavin Nishizawa
3937e37589
improve grid expand evenly
2023-04-28 17:59:08 -07:00
Alexander Wang
cd34ddcc4c
model_order cycle breaking elk
2023-04-20 11:44:00 -07:00
Alexander Wang
88e71c3088
fix elk self loop spacing
2023-04-19 20:09:53 -07:00
gavin-ts
a78698610c
Merge pull request #1198 from gavin-ts/refactor-attributes
...
refactor d2graph.Attributes
2023-04-14 20:18:30 -07:00
Andreas Deininger
6ae417cde9
Fixing typos
...
Signed-off-by: Andreas Deininger <andreas@deininger.net>
2023-04-14 07:48:22 +02:00
Gavin Nishizawa
214c95eefc
refactor d2graph.Attributes
2023-04-13 20:04:55 -07:00
Gavin Nishizawa
882df2fac9
refactor LabelWidth and LabelHeight to LabelDimensions
2023-04-13 15:43:25 -07:00
gavin-ts
1a81930876
Merge pull request #1178 from gavin-ts/grid-gap-keywords
...
Grid gap keywords
2023-04-12 15:23:52 -07:00
Gavin Nishizawa
c0e164e44b
rename to horizontal-gap and vertical-gap
2023-04-12 13:51:04 -07:00
Gavin Nishizawa
851af40a8c
fix grid panic with insuffient objects
2023-04-12 11:49:15 -07:00
Gavin Nishizawa
7631efce2b
cleanup
2023-04-11 11:32:35 -07:00
Gavin Nishizawa
d835ef19a9
if storing int and casting float64 each use
2023-04-11 11:20:21 -07:00
Gavin Nishizawa
a7050f3ca7
use grid-gap values for layout
2023-04-10 20:04:25 -07:00
Alexander Wang
dbc3a69951
fix solo near
2023-04-08 10:07:56 -07:00
Alexander Wang
189e5a005c
Merge pull request #1140 from alexstoick/feat/lifeline-inherit-actor-style
...
Lifeline should inherit the stroke style from the actor
2023-04-07 14:00:12 -07:00
Stoica Alex
2a93d21420
Lifeline should inherit the stroke style from the actor
...
Fixes #1137
2023-04-07 21:31:08 +01:00
donglixiaoche
b2f905efb8
Merge branch 'master' into near-keys-for-container
...
Conflicts:
d2layouts/d2near/layout.go
2023-04-07 10:40:40 +08:00
donglixiaoche
59ef4ad832
fix: cr, attach objects of tempGraph
2023-04-07 10:33:19 +08:00
gavin-ts
b3511d1248
Merge pull request #1122 from gavin-ts/grid-layouts
...
new grid layout with rows/columns
2023-04-06 19:22:24 -07:00
Gavin Nishizawa
a75d4dd0b9
update keywords rows -> grid-rows
2023-04-06 15:48:01 -07:00
Gavin Nishizawa
37fc3ea8e0
cleanup
2023-04-06 15:37:35 -07:00
Gavin Nishizawa
bab54b4030
cleanup
2023-04-06 14:30:45 -07:00
Gavin Nishizawa
8eb99a46c6
new method for placing nodes across rows
2023-04-05 20:02:57 -07:00
donglixiaoche
e61629e692
fix: cr
2023-04-06 05:00:12 +08:00
Gavin Nishizawa
06a942cf99
rename to grid diagram
2023-04-05 11:15:52 -07:00
Gavin Nishizawa
108faceb99
layout evenly with rows and columns
2023-04-04 20:12:20 -07:00
Gavin Nishizawa
ac0845da1c
center container if growing to fit label
2023-04-04 20:12:20 -07:00
Alexander Wang
cadaaeb21f
add padding between dagre labels
2023-04-04 13:50:12 -07:00
Gavin Nishizawa
7ac72140c7
fixing rows creation
2023-04-04 13:44:41 -07:00
Gavin Nishizawa
a16924752d
finish column logic
2023-04-04 11:38:33 -07:00
donglixiaoche
c77590e5bf
fix: cr
2023-04-04 18:33:23 +08:00
Gavin Nishizawa
c958269b03
more dynamic grid sizing according to node sizes
2023-04-03 21:38:08 -07:00
Gavin Nishizawa
acd0638325
evenly size grid nodes
2023-04-03 13:49:10 -07:00
Gavin Nishizawa
06fb313d3e
values must be positive
2023-04-03 13:49:10 -07:00
Gavin Nishizawa
abe27cdc26
cleanup
2023-04-03 13:49:10 -07:00
Gavin Nishizawa
f8617d1560
refactor
2023-04-03 13:49:10 -07:00
Gavin Nishizawa
d139eeadad
layout with grids
2023-04-03 13:48:38 -07:00
donglixiaoche
a3268f2fd1
fix: cr, a clean spilit for temp graph
2023-03-30 20:31:42 +08:00
donglixiaoche
3d45f6ab51
fix: cr, return value
2023-03-28 08:57:15 +08:00
donglixiaoche
66f620f57b
fix: typo
2023-03-27 22:48:02 +08:00
donglixiaoche
54250d00dd
fix: nil labelPosition
2023-03-27 21:40:36 +08:00
donglixiaoche
a21f5ec438
fix: cr, calc labelPosition
2023-03-27 21:38:11 +08:00
donglixiaoche
77822318aa
fix: cr, use method instead of attribute
2023-03-27 21:38:11 +08:00
donglixiaoche
ebab91b043
fix: cr, delete redundant variable
2023-03-27 21:38:11 +08:00
donglixiaoche
4e4959f39b
fix: cr, delete redundant return value
2023-03-27 21:38:11 +08:00
donglixiaoche
7deb725252
chore: delete redundant code
2023-03-27 21:38:10 +08:00
donglixiaoche
df19311f9b
fix: ignore objects inside near container when calc boundingBox
2023-03-27 21:38:10 +08:00
donglixiaoche
17c4851618
fix: calc labelDimension
2023-03-27 21:38:10 +08:00
donglixiaoche
69532df6aa
fix: cr, integrate logic of construct sub graph inside WithoutConstantNears
2023-03-27 21:38:10 +08:00
donglixiaoche
3d32611a01
fix: cr delete extra blank line
2023-03-27 21:38:09 +08:00
donglixiaoche
115f46f428
feat: descendants now is allowed for container with near attribute
2023-03-27 21:38:08 +08:00
Alexander Wang
c3c60c5bab
fix elk container label
2023-03-17 21:46:57 -07:00
Alexander Wang
e36f2f946b
elk fit labels, center contents
2023-03-15 13:07:45 -07:00
Alexander Wang
7f9bc2b033
Merge branch 'master' into elk-shim
2023-03-14 18:38:43 -07:00
gavin-ts
6614000fe5
Merge pull request #1026 from gavin-ts/lint
...
lint for go 1.20
2023-03-14 18:21:38 -07:00
Alexander Wang
b4518cdb03
fix rounding hopefully
2023-03-14 17:54:05 -07:00
Alexander Wang
27870fc7d6
fix
2023-03-14 17:37:19 -07:00
Alexander Wang
f35be526c6
remove ladders
2023-03-14 15:29:50 -07:00
Gavin Nishizawa
9e31f83b7b
consider text containers as label-less when adjusting edges for dagre
2023-03-14 15:14:15 -07:00
Alexander Wang
05938bdef2
s-shape
2023-03-14 14:54:30 -07:00
Alexander Wang
73c35bb14b
implement s-shape
2023-03-14 14:11:51 -07:00
Alexander Wang
90a927131d
node edge spacing
2023-03-14 13:06:56 -07:00
Alexander Wang
330045f6a2
error handling
2023-03-14 12:49:56 -07:00
Gavin Nishizawa
8fe2eee56d
lint
2023-03-14 11:20:00 -07:00
Alexander Wang
a37c456dfc
fixed alignment
2023-03-14 11:08:29 -07:00
Alexander Wang
d6fee41e3b
make dagre inter-container connections better
2023-03-09 19:49:40 -08:00
Alexander Wang
412f53e229
ELK nodes grow to ensure port padding
2023-03-06 22:32:15 -08:00
Gavin Nishizawa
bacb22797c
fix
2023-03-03 22:31:09 -08:00
Gavin Nishizawa
13a3edc4ba
basic fix
2023-03-03 22:18:56 -08:00
Gavin Nishizawa
609b3e5eb3
move person labels to outside bottom
2023-03-02 14:57:13 -08:00
Gavin Nishizawa
d7ad0f39a9
shift whole edge down if horizontal between two non root nodes
2023-02-27 19:54:39 -08:00
Gavin Nishizawa
454196be9b
unless the dst is also on a container
2023-02-27 19:41:59 -08:00
Gavin Nishizawa
5844c54bcf
handle non-vertical directions when shifting nodes
2023-02-27 19:41:18 -08:00
Alexander Wang
25f6c84a3a
check for no actors in sequence diagram
2023-02-23 23:17:45 -08:00
Gavin Nishizawa
daadca15cd
pad label box, avoid short segments
2023-02-23 13:02:40 -08:00
Gavin Nishizawa
e3ac2a4170
move container edge back if it runs into the container's label
2023-02-23 11:35:56 -08:00
Alexander Wang
cd818defc3
add elk version
2023-02-22 18:22:15 -08:00
Alexander Wang
5ff1909935
container dimensions
2023-02-18 23:35:18 -08:00
Júlio César Batista
4b9fc8f7a1
fix near constant removal
2023-02-18 12:20:47 -03:00
Alexander Wang
ffea3c9ab2
fix
2023-02-14 11:34:18 -08:00
gavin-ts
305ed09632
Merge pull request #807 from gavin-ts/limit-oval-aspect-ratio
...
shapes: limit oval aspect ratio
2023-02-13 11:32:29 -08:00
Alexander Wang
aa1f123f71
more accurate
2023-02-13 11:23:54 -08:00
Gavin Nishizawa
4de1f76751
limit oval shape aspect ratio
2023-02-13 11:23:30 -08:00
Alexander Wang
f14326c334
ok
2023-02-13 10:48:55 -08:00
Alexander Wang
e37fc89bb1
icons in top left of containers
2023-02-13 10:42:47 -08:00
Alexander Wang
112558d901
changelog
2023-02-12 10:28:55 -08:00
Alexander Wang
281f163acf
tests
2023-02-12 10:25:28 -08:00
Alexander Wang
900e4bab83
fix note placement bug
2023-02-12 09:59:44 -08:00
Alexander Wang
019429edcf
try different value
2023-02-10 21:45:31 -08:00
Alexander Wang
0f9d98fa8a
Merge branch 'master' into tune-spacing
2023-02-10 21:27:10 -08:00
Alexander Wang
b30a72b2b3
merge
2023-02-10 21:25:28 -08:00
Alexander Wang
c33676a416
ok
2023-02-10 20:47:58 -08:00
Alexander Wang
8ff4cf97ad
continue connecting directly
2023-02-10 20:41:17 -08:00
Alexander Wang
0877c349ad
comments
2023-02-10 14:30:05 -08:00
Alexander Wang
2e5612697f
ooops
2023-02-10 14:28:52 -08:00
Alexander Wang
279b82b5c6
comments
2023-02-10 14:28:43 -08:00
Alexander Wang
af11b4ddb5
tests
2023-02-10 14:02:57 -08:00
Alexander Wang
9fad105822
fix padding
2023-02-10 13:47:22 -08:00
Alexander Wang
4229f52f1f
oops
2023-02-10 13:38:31 -08:00
Alexander Wang
563c6999d0
cleanup
2023-02-10 12:50:25 -08:00
Alexander Wang
ac960ae488
clean
2023-02-10 12:20:00 -08:00
Alexander Wang
939a5ca088
ok
2023-02-10 12:18:50 -08:00
Alexander Wang
8ec04a1f61
save
2023-02-10 10:25:44 -08:00
Alexander Wang
b12c878cf2
crows feet tuning
2023-02-10 00:57:15 -08:00
Alexander Wang
4aaaf8dfa2
elk
2023-02-09 19:49:53 -08:00
Alexander Wang
dbac4b8cdf
dagre
2023-02-09 19:29:30 -08:00
Alexander Wang
2fb01f34a5
fix
2023-02-09 19:19:40 -08:00
Alexander Wang
b02979f7e4
revert sequence diagram changes
2023-02-09 19:18:24 -08:00
Alexander Wang
50281293e7
save
2023-02-09 12:19:33 -08:00
Alexander Wang
cadaf0c830
save
2023-02-08 22:11:52 -08:00
Alexander Wang
273496bc9e
add experr
2023-02-07 20:47:12 -08:00
Gavin Nishizawa
4bfb6af7e6
Merge branch 'master' into shape-specific-inner-boxes
2023-02-02 20:25:52 -08:00
Gavin Nishizawa
1b1cdaff15
Merge branch 'master' into shape-specific-inner-boxes
2023-02-01 10:31:46 -08:00
Anmol Sethi
30b5b64cad
d2ir: Review fixes #714
2023-01-27 23:19:50 -08:00
Anmol Sethi
2d36513e2c
Merge remote-tracking branch 'upstream/master' into scenarios-a407
2023-01-27 10:51:33 -08:00
Gavin Nishizawa
fd72e10dbc
rename lastGroup to prevGroup
2023-01-27 10:09:38 -08:00
Gavin Nishizawa
74b0ed2064
only add message offset after loops in another group
2023-01-26 18:02:32 -08:00
Gavin Nishizawa
576c8df2c8
update message offset for self messages
2023-01-26 18:02:32 -08:00
Gavin Nishizawa
b2036e8bdf
fix sequence diagram actor shape scaling
2023-01-26 16:44:19 -08:00
Anmol Sethi
5af31670d1
d2compiler: Integrate d2ir (wip)
2023-01-24 03:24:32 -08:00
Anmol Sethi
3e7bdc5468
d2compiler: Integrate d2ir (wip)
2023-01-24 03:24:29 -08:00
Anmol Sethi
c9ef6ab9c9
d2graph: Implement deep copying a graph
2023-01-24 02:56:30 -08:00
Alexander Wang
f595aafcc4
fix self-span in sequence diagrams
2023-01-19 18:09:32 -08:00
Alexander Wang
098fc96bd9
edge case
2023-01-19 15:13:18 -08:00
Alexander Wang
320d631113
fix constant-near panic
2023-01-19 15:03:52 -08:00
Alexander Wang
f688efcb48
propagate elk config for self loop spacing
2023-01-18 14:34:14 -08:00
Gavin Nishizawa
54f34d72ad
extend previous segment to target if last segment is very short
2023-01-12 11:23:23 -08:00
Gavin Nishizawa
25e37fd0c4
handle straight line
2023-01-12 11:23:23 -08:00
Alexander Wang
bb92a1c0fa
ok
2023-01-07 19:46:10 -08:00
Alexander Wang
4b12be7974
Revert "remove inferior stub"
...
This reverts commit 0db3a193b8 .
2023-01-06 12:24:45 -08:00
Alexander Wang
0db3a193b8
remove inferior stub
2023-01-06 12:23:47 -08:00
Alexander Wang
4657542def
labelpos
2023-01-06 12:21:47 -08:00
Alexander Wang
2b3faf8f64
fix dagre edge label overlaps
2023-01-06 12:18:26 -08:00
Alexander Wang
87e05bcdd0
fix near overlapping labels
2023-01-06 11:13:52 -08:00
Alexander Wang
8708bceef0
Merge pull request #563 from alixander/layout-configs
...
Pass layout configs
2022-12-30 14:31:05 -08:00
Alexander Wang
26be278934
fix elk
2022-12-30 14:28:52 -08:00
Alexander Wang
115d6e4147
default layouts
2022-12-30 13:36:49 -08:00
Alexander Wang
1831af5308
add tags to dagre
2022-12-30 13:26:01 -08:00
Alexander Wang
4b99bc30a7
elk/dagre name consistency
2022-12-30 12:25:33 -08:00
Alexander Wang
eccec7afdd
elk
2022-12-29 22:43:01 -08:00
Alexander Wang
590caa243c
works
2022-12-29 21:11:45 -08:00
Gavin Nishizawa
f8482ee96a
fix elk panic with empty label
2022-12-29 00:00:56 -08:00
Andreas Deininger
7860114515
Fixing typos
...
Signed-off-by: Andreas Deininger <adeininger@gmail.com>
2022-12-28 20:51:19 +01:00
Alexander Wang
31564f1487
exercise serde
2022-12-26 20:51:37 -08:00
Alexander Wang
849012b9fd
cleanup
2022-12-25 17:43:43 -08:00
Alexander Wang
9eaa4e98c4
cleanup
2022-12-25 16:49:19 -08:00
Alexander Wang
c32bfdda34
constant nears
2022-12-25 16:33:32 -08:00
Alexander Wang
462d22a75f
don't round
2022-12-24 13:39:45 -08:00
Alexander Wang
03e27abb54
elk force order
2022-12-24 13:34:23 -08:00
Alexander Wang
745900b137
fix group label position
2022-12-23 13:16:33 -08:00
Gavin Nishizawa
707f5b9dd7
set dagre ranksep according to max edge label size
2022-12-20 16:05:35 -08:00
Gavin Nishizawa
eed6eadd58
have elk place edge labels on the edge
2022-12-20 15:31:13 -08:00
Gavin Nishizawa
6bb39115d4
place elk edge labels on right with more padding
2022-12-20 15:10:45 -08:00
Gavin Nishizawa
243df4b8e1
use elk layout's edge label position
2022-12-20 14:03:40 -08:00
Gavin Nishizawa
e2b510a1c8
improve label placement for shapes with icons
2022-12-19 20:48:01 -08:00
Gavin Nishizawa
45162a5f6e
update images for elk
2022-12-19 20:15:35 -08:00
Gavin Nishizawa
90846c6599
update label positions for images
2022-12-19 20:02:00 -08:00
Alexander Wang
b5fb81bbb0
Merge branch 'master' into elk-trace-to-shape-border
2022-12-18 20:15:05 -08:00
Alexander Wang
5f1bf2c897
fix sequence edge identify
2022-12-18 20:06:36 -08:00
Gavin Nishizawa
801d307807
trace elk edges to shape border
2022-12-17 20:40:56 -08:00
Alexander Wang
c4483523bf
fix sequence diagram with no messages
2022-12-11 16:35:27 -08:00
Anmol Sethi
b704c6684b
ci: Update [ci-force]
2022-12-07 23:41:33 -08:00
Anmol Sethi
b72959a91f
fmt
2022-12-07 23:22:20 -08:00
Anmol Sethi
d4d6c760e5
d2dagrelayout: Fix regexp
...
See https://github.com/terrastruct/d2/pull/394#discussion_r1042504655
2022-12-07 19:21:56 -08:00
ejulio-ts
cb414e5382
Merge pull request #397 from ejulio-ts/gh-391-spans
...
sequence_diagram: Fix span size
2022-12-07 09:48:04 -08:00
Toyam Cox
a1b192723f
fix builds on 32bit systems
...
@alixander says: This is the highest number we go to:
```
d2/lib/imgbundler/imgbundler.go
Line 25 in 3f62eed
const maxImageSize int64 = 1 << 25 // 33_554_432
```
This is several shy of 64 bits, and even shy of 32 bits, so let's just
choose 32 bits.
2022-12-07 10:55:46 -05:00
Júlio César Batista
37ff40a3d0
Fix span size
2022-12-06 14:19:50 -08:00
Júlio César Batista
8764dfb78b
Fixes issues with special chars in dagre ids
2022-12-06 13:44:59 -08:00
Alexander Wang
845219d60d
fix sequence distancing
2022-12-05 22:45:11 -08:00
Júlio César Batista
e1685ac09e
Merge branch 'master' into page-render
2022-12-05 19:47:42 -08:00
Júlio César Batista
c6e389ee9a
Set sequence diagrams note to shape: page
2022-12-05 19:39:59 -08:00
Alexander Wang
80d59be429
fix empty sequence panic
2022-12-05 14:51:01 -08:00