From 32a0e1569144e1b4384c3f7e984a72cc90716823 Mon Sep 17 00:00:00 2001 From: Scott Bell Date: Mon, 6 Jan 2025 10:40:51 +0100 Subject: [PATCH] handle case where we only have events in timeline --- src/plugins/timeline/TimelineViewLayout.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/timeline/TimelineViewLayout.vue b/src/plugins/timeline/TimelineViewLayout.vue index c6ff2dbd75..3d67cf74ea 100644 --- a/src/plugins/timeline/TimelineViewLayout.vue +++ b/src/plugins/timeline/TimelineViewLayout.vue @@ -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;