Skip to content

Commit

Permalink
fix: linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
spectrachrome committed Nov 9, 2023
1 parent ea2e8cf commit 465f0cc
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions app/src/components/map/SliderTicks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default {
},
/** Lines with limited tick frequency for display purposes only */
displayedLines () {
displayedLines() {
const num = this.numLines > (this.width / 2)
? (this.width / 2)
: this.numLines;
Expand All @@ -80,7 +80,7 @@ export default {
if (index === 0 || currentYear !== previousYear) {
yearMarks.push({
label: currentYear,
position: line // Assuming 'line' is the position of the tick
position: line,
});
}
Expand All @@ -91,14 +91,8 @@ export default {
// Filter out year marks that are too close together, in favor of the second one.
return yearMarks.filter((current, i) => {
const next = yearMarks[i + 1];
if (next && next.position - current.position < 20) {
return false;
} else {
return true;
}
return !(next && next.position - current.position < 20);
});
return yearMarks;
},
},
mounted() {
Expand Down

0 comments on commit 465f0cc

Please sign in to comment.