diff --git a/src/runtime/transition/index.ts b/src/runtime/transition/index.ts index dc398348b4..fc42ee2dcf 100644 --- a/src/runtime/transition/index.ts +++ b/src/runtime/transition/index.ts @@ -178,7 +178,10 @@ export function draw(node: SVGElement & { getTotalLength(): number }, { duration, easing = cubicInOut }: DrawParams = {}): TransitionConfig { - const len = node.getTotalLength(); + let len = node.getTotalLength(); + if (getComputedStyle(node).strokeLinecap !== 'butt') { + len += parseInt(getComputedStyle(node).strokeWidth); + } if (duration === undefined) { if (speed === undefined) {