handle case where we only have events in timeline

This commit is contained in:
Scott Bell 2025-01-06 10:40:51 +01:00
parent 0e940b2883
commit 32a0e15691

View File

@ -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;