From 98f779791a31fbbe6bfd66719d9ca528f5ef4566 Mon Sep 17 00:00:00 2001 From: Siyabonga Nzulwana Date: Thu, 27 Aug 2020 17:55:47 +0200 Subject: [PATCH 1/2] a proposed fix to the strokeCap issue number 11 --- src/Pie.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pie.js b/src/Pie.js index 8689447..b845ffb 100644 --- a/src/Pie.js +++ b/src/Pie.js @@ -138,7 +138,7 @@ const CleanUpCircles = ({dimensions, backgroundColor, visible}) => { const { radius, innerRadius, width} = dimensions; const innerBackgroundPath = createPath(radius, radius, innerRadius - ((width) / 2), 0, 360); const outerBackgroundPath = createPath(radius, radius, radius + ((width)) / 2, 0, 360); - if((width) < 100 && visible){ + if((width) > 100 && visible){ return (<> { } const Pie = ({ sections, radius, innerRadius, backgroundColor, strokeCap, dividerSize }) => { - strokeCapForLargeBands = dividerSize > 0 || strokeCap == 'butt' ? 'butt' : 'butt'; + strokeCapForLargeBands = dividerSize > 0 || strokeCap == 'butt' ? 'butt' : 'round'; const shouldShowRoundDividers = strokeCap === 'round'; let paintedSections = []; From 99e7cc4b7dfcf07fc92264cea09a4743555fc9bd Mon Sep 17 00:00:00 2001 From: Siyabonga Nzulwana Date: Mon, 7 Sep 2020 21:29:37 +0200 Subject: [PATCH 2/2] changed back > sign to < on one condition --- src/Pie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pie.js b/src/Pie.js index b845ffb..70ef68f 100644 --- a/src/Pie.js +++ b/src/Pie.js @@ -138,7 +138,7 @@ const CleanUpCircles = ({dimensions, backgroundColor, visible}) => { const { radius, innerRadius, width} = dimensions; const innerBackgroundPath = createPath(radius, radius, innerRadius - ((width) / 2), 0, 360); const outerBackgroundPath = createPath(radius, radius, radius + ((width)) / 2, 0, 360); - if((width) > 100 && visible){ + if((width) < 100 && visible){ return (<>