Skip to content

Commit

Permalink
fix last item in vertical layout
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Jan 1, 2021
1 parent 3dba468 commit 1dda987
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ export default function milestones(selector) {
.classed(cssLastClass, (d) => {
const mostRightPosition = Math.round(x.range()[1]);
const currentPosition = x(aggregateFormatParse(d.key));
return mostRightPosition === currentPosition; // nestedData[d.timelineIndex].length === (d.index + 1);
return (
mostRightPosition === currentPosition &&
orientation === 'horizontal'
);
})
.classed(cssAboveClass + '-' + orientation, (d) =>
isAbove(d.index, distribution)
Expand Down

0 comments on commit 1dda987

Please sign in to comment.