mirror of
https://github.com/nasa/openmct.git
synced 2025-05-30 06:04:20 +00:00
handle case where we only have events in timeline
This commit is contained in:
parent
0e940b2883
commit
32a0e15691
@ -286,7 +286,8 @@ export default {
|
|||||||
const timelineHolderRect = this.$refs.timelineHolder.getBoundingClientRect();
|
const timelineHolderRect = this.$refs.timelineHolder.getBoundingClientRect();
|
||||||
const laneObjectRect = firstSwimLane.getBoundingClientRect();
|
const laneObjectRect = firstSwimLane.getBoundingClientRect();
|
||||||
const offset = laneObjectRect.left - timelineHolderRect.left;
|
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;
|
return swimLaneOffset;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user