diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go
index 22f984345..097d38504 100644
--- a/d2renderers/d2svg/d2svg.go
+++ b/d2renderers/d2svg/d2svg.go
@@ -226,34 +226,32 @@ func arrowheadMarker(isTarget bool, id string, connection d2target.Connection) s
}
case d2target.FilledCircleArrowhead:
attrs := fmt.Sprintf(`class="connection" fill="%s" stroke-width="%d"`, connection.Stroke, connection.StrokeWidth)
- offset := 4.0 + float64(connection.StrokeWidth*2)
if isTarget {
path = fmt.Sprintf(``,
attrs,
- offset+11, height/2,
- offset*1.2,
+ width/2+5, height/2,
+ width/3,
)
} else {
path = fmt.Sprintf(``,
attrs,
- offset+1, height/2,
- offset*1.2,
+ width/2-5, height/2,
+ width/3,
)
}
case d2target.CircleArrowhead:
attrs := fmt.Sprintf(`class="connection" fill="white" stroke="%s" stroke-width="%d"`, connection.Stroke, connection.StrokeWidth)
- offset := 4.0 + float64(connection.StrokeWidth*2)
if isTarget {
path = fmt.Sprintf(``,
attrs,
- offset+12, height/2,
- offset*1.2,
+ width/2+5, height/2,
+ width/3.2,
)
} else {
path = fmt.Sprintf(``,
attrs,
- offset+4, height/2,
- offset*1.2,
+ width/2-5, height/2,
+ width/3.2,
)
}
@@ -310,14 +308,6 @@ func arrowheadMarker(isTarget bool, id string, connection d2target.Connection) s
refX = width/8 + 0.6*strokeWidth
}
width *= 1.1
-
- case d2target.CircleArrowhead:
- if isTarget {
- refX = width - 0.6*strokeWidth
- } else {
- refX = width/8 + 0.6*strokeWidth
- }
- width *= 1.1
default:
if isTarget {
refX = width - 1.5*strokeWidth
diff --git a/e2etests/testdata/stable/circle_arrowhead/dagre/sketch.exp.svg b/e2etests/testdata/stable/circle_arrowhead/dagre/sketch.exp.svg
index 8ca984fdc..33d49792e 100644
--- a/e2etests/testdata/stable/circle_arrowhead/dagre/sketch.exp.svg
+++ b/e2etests/testdata/stable/circle_arrowhead/dagre/sketch.exp.svg
@@ -39,7 +39,7 @@ width="491" height="577" viewBox="-102 -102 491 577">