Skip to content

Commit

Permalink
handle case where we only have events in timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbell committed Jan 6, 2025
1 parent 0e940b2 commit 32a0e15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/timeline/TimelineViewLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ export default {
const timelineHolderRect = this.$refs.timelineHolder.getBoundingClientRect();
const laneObjectRect = firstSwimLane.getBoundingClientRect();
const offset = laneObjectRect.left - timelineHolderRect.left;
const swimLaneOffset = offset + AXES_PADDING;
const hasAxes = this.alignmentData.axes && Object.keys(this.alignmentData.axes).length > 0;
const swimLaneOffset = hasAxes ? offset + AXES_PADDING : offset;
return swimLaneOffset;
} else {
return 0;
Expand Down

0 comments on commit 32a0e15

Please sign in to comment.