From bcc040f2bc0d647d1105d4976f1421844455b9ea Mon Sep 17 00:00:00 2001 From: Said MARAR Date: Thu, 29 Dec 2022 12:23:08 +0100 Subject: [PATCH 1/2] fix(line): hide when length subpath is zero --- src/Line.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Line.tsx b/src/Line.tsx index 169fa62..9409666 100644 --- a/src/Line.tsx +++ b/src/Line.tsx @@ -67,6 +67,7 @@ const Line: React.FC = ({ }; const color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1]; stackPtg += ptg; + console.log({ptg}); return ( = ({ stroke={color as string} strokeWidth={strokeWidth} fillOpacity="0" + opacity={ptg === 0 ? 0 : 1} ref={(elem) => { // https://reactjs.org/docs/refs-and-the-dom.html#callback-refs // React will call the ref callback with the DOM element when the component mounts, From 1abf18585dd9da57a6f9609cf0b79b1195aede26 Mon Sep 17 00:00:00 2001 From: Said MARAR Date: Thu, 29 Dec 2022 12:31:19 +0100 Subject: [PATCH 2/2] remove console --- src/Line.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Line.tsx b/src/Line.tsx index 9409666..6eb9a9a 100644 --- a/src/Line.tsx +++ b/src/Line.tsx @@ -67,7 +67,6 @@ const Line: React.FC = ({ }; const color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1]; stackPtg += ptg; - console.log({ptg}); return (