Skip to content

Commit

Permalink
Channel clipPath bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Nov 22, 2022
1 parent 7b91931 commit 31aa12c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type CProps = {
seriesRange: [number, number],
amplitudeScale: number,
scales: [ScaleLinear<number, number, never>, ScaleLinear<number, number, never>],
fileID: number,
color?: string
};

Expand All @@ -71,6 +72,7 @@ const LineChunk = ({
seriesRange,
amplitudeScale,
scales,
fileID,
color,
...rest
}: CProps) => {
Expand All @@ -93,7 +95,7 @@ const LineChunk = ({

return (
<Group
style={{clipPath: 'url(#lineChunk)'}}
style={{clipPath: 'url(#lineChunk-' + fileID + ')'}}
top={-p0[1]}
>
<Group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const SeriesRenderer: FunctionComponent<CProps> = ({

return (
<>
<clipPath id='lineChunk' clipPathUnits='userSpaceOnUse'>
<clipPath id={'lineChunk-' + fileID} clipPathUnits='userSpaceOnUse'>
<rect
x={-viewerWidth / 2}
y={-viewerHeight / (2 * MAX_CHANNELS)}
Expand Down

0 comments on commit 31aa12c

Please sign in to comment.