Skip to content

Commit

Permalink
Merge pull request #2183 from alixander/circle-fit
Browse files Browse the repository at this point in the history
circle fit
  • Loading branch information
alixander authored Oct 31, 2024
2 parents 3d39254 + 62cf930 commit 2cef20b
Show file tree
Hide file tree
Showing 99 changed files with 9,034 additions and 9,031 deletions.
2 changes: 2 additions & 0 deletions ci/release/changelogs/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- CLI: attempts writing to path atomically, falling back to non-atomic if failed [#2141](https://github.com/terrastruct/d2/pull/2141)
- Export: pptx has "created at" metadata removed, so successive runs yield the same result [#2169](https://github.com/terrastruct/d2/pull/2160)
- Formatter: empty board keywords (e.g. `layers`) are removed [#2178](https://github.com/terrastruct/d2/pull/2178)
- Render: circle containers are tighter fitting [#2183](https://github.com/terrastruct/d2/pull/2183)
- Render: a tooltip or link by itself will not expand width of shape [#2183](https://github.com/terrastruct/d2/pull/2183)

#### Bugfixes ⛑️

Expand Down
7 changes: 2 additions & 5 deletions d2graph/d2graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -1544,11 +1544,8 @@ func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler
switch shapeType {
case shape.TABLE_TYPE, shape.CLASS_TYPE, shape.CODE_TYPE:
default:
if obj.Link != nil {
paddingX += 32
}
if obj.Tooltip != nil {
paddingX += 32
if obj.Link != nil && obj.Tooltip != nil {
paddingX += 64
}
}
}
Expand Down
156 changes: 78 additions & 78 deletions d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
156 changes: 78 additions & 78 deletions d2renderers/d2sketch/testdata/all_shapes_dark/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
156 changes: 78 additions & 78 deletions d2renderers/d2sketch/testdata/dots-all/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
156 changes: 78 additions & 78 deletions d2renderers/d2sketch/testdata/dots-multiple/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 79 additions & 79 deletions d2renderers/d2svg/appendix/testdata/internal-links/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 76 additions & 76 deletions d2renderers/d2svg/appendix/testdata/links/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 76 additions & 76 deletions d2renderers/d2svg/appendix/testdata/links_dark/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
160 changes: 80 additions & 80 deletions d2renderers/d2svg/appendix/testdata/tooltip_fill/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
154 changes: 77 additions & 77 deletions d2renderers/d2svg/dark_theme/testdata/all_shapes/dark_theme.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 79 additions & 79 deletions e2etests-cli/testdata/TestCLI_E2E/board_import/hello-world-x.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 79 additions & 79 deletions e2etests-cli/testdata/TestCLI_E2E/board_import/hello-world.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 79 additions & 79 deletions e2etests-cli/testdata/TestCLI_E2E/import.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 79 additions & 79 deletions e2etests-cli/testdata/TestCLI_E2E/layer-link/index.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 79 additions & 79 deletions e2etests-cli/testdata/TestCLI_E2E/layer-link/test2.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions e2etests/testdata/patterns/all_shapes/dagre/board.exp.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

154 changes: 77 additions & 77 deletions e2etests/testdata/patterns/all_shapes/dagre/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions e2etests/testdata/patterns/multiple/dagre/board.exp.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

154 changes: 77 additions & 77 deletions e2etests/testdata/patterns/multiple/dagre/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions e2etests/testdata/patterns/paper/dagre/board.exp.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

154 changes: 77 additions & 77 deletions e2etests/testdata/patterns/paper/dagre/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

158 changes: 79 additions & 79 deletions e2etests/testdata/regression/ampersand-escape/dagre/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

158 changes: 79 additions & 79 deletions e2etests/testdata/regression/ampersand-escape/elk/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

164 changes: 82 additions & 82 deletions e2etests/testdata/regression/icons_on_top/dagre/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions e2etests/testdata/regression/icons_on_top/elk/board.exp.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

164 changes: 82 additions & 82 deletions e2etests/testdata/regression/icons_on_top/elk/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

158 changes: 79 additions & 79 deletions e2etests/testdata/regression/link_with_ampersand/dagre/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

158 changes: 79 additions & 79 deletions e2etests/testdata/regression/link_with_ampersand/elk/sketch.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2cef20b

Please sign in to comment.