From 9ac7a301b1aa31353c43daede7e2e65ceeb3898c Mon Sep 17 00:00:00 2001 From: segelt <86981324+segelt@users.noreply.github.com> Date: Sun, 2 Apr 2023 22:22:58 +0300 Subject: [PATCH] fixes #1104 --- d2renderers/d2svg/appendix/appendix.go | 2 +- .../testdata/diagram_wider_than_tooltip/sketch.exp.svg | 4 ++-- .../d2svg/appendix/testdata/internal-links/sketch.exp.svg | 2 +- d2renderers/d2svg/appendix/testdata/links/sketch.exp.svg | 6 +++--- .../d2svg/appendix/testdata/links_dark/sketch.exp.svg | 6 +++--- .../d2svg/appendix/testdata/tooltip_fill/sketch.exp.svg | 4 ++-- .../testdata/tooltip_wider_than_diagram/sketch.exp.svg | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/d2renderers/d2svg/appendix/appendix.go b/d2renderers/d2svg/appendix/appendix.go index a0eb21077..0f58ffa82 100644 --- a/d2renderers/d2svg/appendix/appendix.go +++ b/d2renderers/d2svg/appendix/appendix.go @@ -238,7 +238,7 @@ func generateLine(i, y int, text string, ruler *textmeasure.Ruler) (string, int, 0, y, generateNumberedIcon(i, 0, 0)) line += fmt.Sprintf(`%s`, - ICON_RADIUS*3, y, FONT_SIZE, d2svg.RenderText(text, ICON_RADIUS*3, float64(dims.Height))) + ICON_RADIUS*3, y+5, FONT_SIZE, d2svg.RenderText(text, ICON_RADIUS*3, float64(dims.Height))) return line, dims.Width + ICON_RADIUS*3, go2.IntMax(dims.Height, ICON_RADIUS*2) } diff --git a/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg b/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg index 615e8b5ff..2a624e820 100644 --- a/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg +++ b/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg @@ -115,8 +115,8 @@ -1Like starbucks or something -2I'm not sure what this is +1Like starbucks or something +2I'm not sure what this is x1 -1root > x +1root > x x1y2Gee, I feel kind of LIGHT in the head now, knowing I can't make my satellite dish PAYMENTS!3 -1https://d2lang.com -2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! -3https://terrastruct.com +1https://d2lang.com +2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! +3https://terrastruct.com x1y2Gee, I feel kind of LIGHT in the head now, knowing I can't make my satellite dish PAYMENTS!3 -1https://d2lang.com -2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! -3https://fosny.eu +1https://d2lang.com +2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! +3https://fosny.eu x1Total abstinence is easier than perfect moderationy2Gee, I feel kind of LIGHT in the head now, knowing I can't make my satellite dish PAYMENTS! -1Total abstinence is easier than perfect moderation -2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! +1Total abstinence is easier than perfect moderation +2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! x1Total abstinence is easier than perfect moderationy2Gee, I feel kind of LIGHT in the head now, knowing I can't make my satellite dish PAYMENTS! -1Total abstinence is easier than perfect moderation -2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! +1Total abstinence is easier than perfect moderation +2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS!