pull/6195/head
Conduitry 5 years ago
parent 516daa2b03
commit 3ef36971cf

@ -178,9 +178,10 @@ export function draw(node: SVGElement & { getTotalLength(): number }, {
duration, duration,
easing = cubicInOut easing = cubicInOut
}: DrawParams = {}): TransitionConfig { }: DrawParams = {}): TransitionConfig {
const has_end_caps = getComputedStyle(node).strokeLinecap !== 'butt'; let len = node.getTotalLength();
const cap_size = has_end_caps ? parseInt(getComputedStyle(node).strokeWidth) : 0; if (getComputedStyle(node).strokeLinecap !== 'butt') {
const len = node.getTotalLength() + cap_size; len += parseInt(getComputedStyle(node).strokeWidth);
}
if (duration === undefined) { if (duration === undefined) {
if (speed === undefined) { if (speed === undefined) {

Loading…
Cancel
Save