diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 2fe07ff68..0b86b6a15 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -233,14 +233,14 @@ func arrowheadMarker(isTarget bool, id string, connection d2target.Connection) s path = fmt.Sprintf(``, attrs, - 3.2*4+2.2, + (height/1.6)/strokeWidth*2, (height/1.6)/strokeWidth*2, (width/3.2)/strokeWidth*2, ) } else { path = fmt.Sprintf(``, attrs, - 3.2*4+2.2, + (height/1.6)/strokeWidth*2, (height/1.6)/strokeWidth*2, (width/3.2)/strokeWidth*2, ) @@ -250,14 +250,14 @@ func arrowheadMarker(isTarget bool, id string, connection d2target.Connection) s if isTarget { path = fmt.Sprintf(``, attrs, - 3.2*4+2.2, + (height/1.6)/strokeWidth*2, (height/1.6)/strokeWidth*2, (width/3.2)/strokeWidth*2, ) } else { path = fmt.Sprintf(``, attrs, - 3.2*4+2.2, + (height/1.6)/strokeWidth*2, (height/1.6)/strokeWidth*2, (width/3.2)/strokeWidth*2, )