fix(breanna): Eliminate warning messages when there is no secondary dart
This commit is contained in:
parent
f2bdb43270
commit
9ba0214fbf
1 changed files with 32 additions and 20 deletions
|
@ -84,27 +84,39 @@ export function getDartLocationsAsNumbers(options) {
|
||||||
else return [loc1, loc2]
|
else return [loc1, loc2]
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getDartPaths = (Path, points) => [
|
export const getDartPaths = (Path, points) => {
|
||||||
|
let dart_paths = [
|
||||||
new Path()
|
new Path()
|
||||||
.line(points.primaryBustDart1)
|
.line(points.primaryBustDart1)
|
||||||
.line(points.primaryBustDartTip)
|
.line(points.primaryBustDartTip)
|
||||||
.line(points.primaryBustDart2),
|
.line(points.primaryBustDart2),
|
||||||
|
]
|
||||||
|
if ('secondaryBustDart1' in points)
|
||||||
|
dart_paths.push(
|
||||||
new Path()
|
new Path()
|
||||||
.line(points.secondaryBustDart1)
|
.line(points.secondaryBustDart1)
|
||||||
.line(points.secondaryBustDartTip)
|
.line(points.secondaryBustDartTip)
|
||||||
.line(points.secondaryBustDart2),
|
.line(points.secondaryBustDart2)
|
||||||
]
|
)
|
||||||
|
return dart_paths
|
||||||
|
}
|
||||||
|
|
||||||
export const getSaDartPaths = (Path, points) => [
|
export const getSaDartPaths = (Path, points) => {
|
||||||
|
let dart_paths = [
|
||||||
new Path()
|
new Path()
|
||||||
.line(points.primaryBustDart1)
|
.line(points.primaryBustDart1)
|
||||||
.line(points.primaryBustDartEdge)
|
.line(points.primaryBustDartEdge)
|
||||||
.line(points.primaryBustDart2),
|
.line(points.primaryBustDart2),
|
||||||
|
]
|
||||||
|
if ('secondaryBustDart1' in points)
|
||||||
|
dart_paths.push(
|
||||||
new Path()
|
new Path()
|
||||||
.line(points.secondaryBustDart1)
|
.line(points.secondaryBustDart1)
|
||||||
.line(points.secondaryBustDartEdge)
|
.line(points.secondaryBustDartEdge)
|
||||||
.line(points.secondaryBustDart2),
|
.line(points.secondaryBustDart2)
|
||||||
]
|
)
|
||||||
|
return dart_paths
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Once the front is constructed with the theorethical bust darts, we
|
* Once the front is constructed with the theorethical bust darts, we
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue