Commit graph

42 commits

Author SHA1 Message Date
Fahmi Akbar Wildana
3954431234
only auto adjust the height, remove AutoSize()
seems like the layout engine always came up with the optimal width
2025-02-23 12:21:55 +07:00
Fahmi Akbar Wildana
4eb3c2d258
revise AutoSize() 2025-02-23 10:37:49 +07:00
Fahmi Akbar Wildana
d94491dc22
add AutoSize() too determine optimal width and height 2025-02-23 07:00:40 +07:00
Fahmi Akbar Wildana
24a413a737
retain text/label 2025-02-18 12:22:19 +07:00
Fahmi Akbar Wildana
3c92ce1679
don't maintain aspect ration 2025-02-17 07:19:44 +07:00
Fahmi Akbar Wildana
2b109ab105
downscale the result if it get to big 2025-02-16 18:13:12 +07:00
Fahmi Akbar Wildana
40f8a88f15
remove margin 2025-02-16 18:10:31 +07:00
Fahmi Akbar Wildana
f63591194c
add examples output
```fish
for f in docs/**.d2
  set -l dir (dirname $f)
  set -l name (basename $f .d2)
  if [ $name = "in" ]
      set name out
  end
  if [ $name = "input" ]
      set name output
  end
  go run main.go $f $dir/$name.txt
end
```
2025-02-14 13:15:31 +07:00
Alexander Wang
7ac918fc37
fmt example 2025-02-13 11:22:47 -07:00
Alexander Wang
f711a76ade
add diagram hash salt 2025-01-30 14:48:41 -07:00
Alexander Wang
ce40826d51
ensure unique diagram hash based on appearance 2025-01-29 16:29:32 -07:00
Alexander Wang
aedc7f87a5
docs: update lib examples with proper context logging 2024-12-27 16:47:41 -07:00
Alexander Wang
4c91208ee6
fmt 2023-12-06 05:05:00 -08:00
Alexander Wang
57e7eb8008
changelog 2023-12-06 04:57:35 -08:00
Alexander Wang
339c0b3d81
[ci-force] fix fmt in example 2023-08-01 10:30:02 -07:00
Alexander Wang
9122ce1c2b
robust hash 2023-07-29 11:31:03 -07:00
Alexander Wang
45b396c894
config vars 2023-07-20 16:08:08 -07:00
Alexander Wang
a1df49c21e
cleanup 2023-06-20 18:56:04 -07:00
Alexander Wang
22bd19b55d
fix 2023-05-07 16:18:02 -07:00
bokura
a80ca6c43a
Update japan.d2
https://github.com/terrastruct/d2/issues/576#issuecomment-1512616540
2023-04-19 11:42:26 +09:00
Alexander Wang
671fd4f16a
[ci-force] add japan example 2023-04-17 18:32:23 -07:00
Alexander Wang
13b385346a
[ci-base] add d2 pptx example 2023-04-17 17:12:33 -07:00
Alexander Wang
6f27dc1733
add example 2023-04-14 13:23:31 -07:00
Alexander Wang
4c8c2b1ab5
define new theme 2023-03-15 17:54:34 -07:00
Vojtěch Fošnár
6e64949b9e
use pointer for DarkThemeID 2023-02-19 15:33:40 +01:00
Vojtěch Fošnár
6a89beaeb1
merge updates 2023-02-19 12:32:44 +01:00
Gavin Nishizawa
f5d0f36988
update example d2 file 2023-02-12 07:44:17 -08:00
Vojtěch Fošnár
01928a5032
review fixes 2023-01-30 12:06:54 +01:00
Vojtěch Fošnár
d24a5c1ec3
updated export and render options 2023-01-27 22:41:59 +01:00
Vojtěch Fošnár
af2be1232f
resolved conflicts, updated tests 2023-01-27 22:30:44 +01:00
Bernard Xie
35c1a1633f
add script to tests 2023-01-03 16:42:39 -08:00
Alexander Wang
115d6e4147
default layouts 2022-12-30 13:36:49 -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
07fb1a3d86
implement sketch 2022-12-21 20:55:27 -08:00
Alexander Wang
8feb4d4749
add pad option 2022-12-11 23:39:21 -08:00
Anmol Sethi
fbf81c199c
docs: Add chess example 2022-12-06 02:03:58 -08:00
Anmol Sethi
c4ef432daf
Move textmeasure into lib
It's not a d2renderer.
2022-12-01 06:51:17 -08:00
Anmol Sethi
f334ef5952
README: Cleanup examples to make them runnable and testable 2022-11-30 22:54:47 -08:00
Alexander Wang
e292ab4c97
2022-11-23 01:10:26PM 2022-11-23 13:10:26 -08:00
Alexander Wang
2a0b126331
2022-11-23 01:08:17PM 2022-11-23 13:08:17 -08:00
Alexander Wang
995143e3be
2022-11-23 01:04:26PM 2022-11-23 13:04:26 -08:00
Alexander Wang
875f9fd76e
2022-11-22 01:44:59PM 2022-11-22 13:44:59 -08:00