Skip to content

Commit

Permalink
Closes #7936
Browse files Browse the repository at this point in the history
- Add in alignmentData to set the left edge of the imagery-tsv element properly.
  • Loading branch information
charlesh88 committed Dec 19, 2024
1 parent 9522040 commit 6cafa7a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/plugins/imagery/components/ImageryTimeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<div ref="imagery" class="c-imagery-tsv js-imagery-tsv">
<div ref="imagery" class="c-imagery-tsv js-imagery-tsv" :style="{ left: leftOffset + 'px' }">
<div ref="imageryHolder" class="c-imagery-tsv__contents u-contents"></div>
</div>
</template>
Expand All @@ -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';
Expand All @@ -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 = {};
Expand All @@ -60,6 +70,11 @@ export default {
keyString: undefined
};
},
computed: {
leftOffset() {
return this.alignmentData.leftWidth + AXES_PADDING;
}
},
watch: {
imageHistory: {
handler(newHistory, oldHistory) {
Expand Down

0 comments on commit 6cafa7a

Please sign in to comment.