Skip to content

Commit

Permalink
Merge pull request #838 from anastasiia-gontarieva/patch-1
Browse files Browse the repository at this point in the history
Remove code duplication
  • Loading branch information
hshoff authored Oct 5, 2020
2 parents 5813f1c + 0a3a0b5 commit cc85c71
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/visx-pattern/src/patterns/Lines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export function pathForOrientation({
orientation: PatternOrientationType;
}) {
switch (orientation) {
case PatternOrientation.vertical:
return `M ${height / 2}, 0 l 0, ${height}`;
case PatternOrientation.horizontal:
return `M 0,${height / 2} l ${height},0`;
case PatternOrientation.diagonal:
Expand All @@ -23,6 +21,7 @@ export function pathForOrientation({
return `M 0,0 l ${height},${height}
M ${-height / 4},${(3 / 4) * height} l ${height / 2},${height / 2}
M ${(3 / 4) * height},${-height / 4} l ${height / 2},${height / 2}`;
case PatternOrientation.vertical:
default:
return `M ${height / 2}, 0 l 0, ${height}`;
}
Expand Down

0 comments on commit cc85c71

Please sign in to comment.