From baf5f355d6679ba4265fc9fdcd0f58e7e580d579 Mon Sep 17 00:00:00 2001 From: mjfwebb Date: Sun, 3 May 2020 22:28:07 +0200 Subject: [PATCH] Changes strokeWidth to always equal strokeWidth. Adds opacity set to 0 on 0 progress (ptg), otherwise 1. Due to the CSS transition and element width race-condition there is a need to keep the width greater than 0. --- src/Circle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Circle.js b/src/Circle.js index 582b2b4..783604f 100644 --- a/src/Circle.js +++ b/src/Circle.js @@ -107,7 +107,8 @@ class Circle extends Component { d={pathString} stroke={stroke} strokeLinecap={strokeLinecap} - strokeWidth={ptg === 0 ? 0 : strokeWidth} + strokeWidth={strokeWidth} + opacity={ptg === 0 ? 0 : 1} fillOpacity="0" style={pathStyle} ref={path => {