From 6cafa7a22de76262eb62e40c17b4aa5eec5a0b62 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Thu, 19 Dec 2024 12:45:18 -0800 Subject: [PATCH] Closes #7936 - Add in alignmentData to set the left edge of the imagery-tsv element properly. --- .../imagery/components/ImageryTimeView.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/plugins/imagery/components/ImageryTimeView.vue b/src/plugins/imagery/components/ImageryTimeView.vue index 5f4caaa5dac..9cccdc25c86 100644 --- a/src/plugins/imagery/components/ImageryTimeView.vue +++ b/src/plugins/imagery/components/ImageryTimeView.vue @@ -21,7 +21,7 @@ --> @@ -30,12 +30,15 @@ import { scaleLinear, scaleUtc } from 'd3-scale'; import _ from 'lodash'; import mount from 'utils/mount'; +import { inject } from 'vue'; import SwimLane from '@/ui/components/swim-lane/SwimLane.vue'; import { PREVIEW_ACTION_KEY } from '@/ui/preview/PreviewAction.js'; +import { useAlignment } from '../../../ui/composables/alignmentContext'; import imageryData from '../../imagery/mixins/imageryData.js'; +const AXES_PADDING = 20; const PADDING = 1; const IMAGE_WIDTH_THRESHOLD = 25; const CONTAINER_CLASS = 'c-imagery-tsv-container'; @@ -46,6 +49,13 @@ const ID_PREFIX = 'wrapper-'; export default { mixins: [imageryData], inject: ['openmct', 'domainObject', 'objectPath'], + setup() { + const domainObject = inject('domainObject'); + const objectPath = inject('objectPath'); + const openmct = inject('openmct'); + const { alignment: alignmentData } = useAlignment(domainObject, objectPath, openmct); + return { alignmentData }; + }, data() { let timeSystem = this.openmct.time.getTimeSystem(); this.metadata = {}; @@ -60,6 +70,11 @@ export default { keyString: undefined }; }, + computed: { + leftOffset() { + return this.alignmentData.leftWidth + AXES_PADDING; + } + }, watch: { imageHistory: { handler(newHistory, oldHistory) {