mirror of
https://github.com/nasa/openmct.git
synced 2025-02-11 05:12:14 +00:00
Closes #7936
- Add in alignmentData to set the left edge of the imagery-tsv element properly.
This commit is contained in:
parent
9522040929
commit
6cafa7a22d
@ -21,7 +21,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<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 ref="imageryHolder" class="c-imagery-tsv__contents u-contents"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -30,12 +30,15 @@
|
|||||||
import { scaleLinear, scaleUtc } from 'd3-scale';
|
import { scaleLinear, scaleUtc } from 'd3-scale';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import mount from 'utils/mount';
|
import mount from 'utils/mount';
|
||||||
|
import { inject } from 'vue';
|
||||||
|
|
||||||
import SwimLane from '@/ui/components/swim-lane/SwimLane.vue';
|
import SwimLane from '@/ui/components/swim-lane/SwimLane.vue';
|
||||||
import { PREVIEW_ACTION_KEY } from '@/ui/preview/PreviewAction.js';
|
import { PREVIEW_ACTION_KEY } from '@/ui/preview/PreviewAction.js';
|
||||||
|
|
||||||
|
import { useAlignment } from '../../../ui/composables/alignmentContext';
|
||||||
import imageryData from '../../imagery/mixins/imageryData.js';
|
import imageryData from '../../imagery/mixins/imageryData.js';
|
||||||
|
|
||||||
|
const AXES_PADDING = 20;
|
||||||
const PADDING = 1;
|
const PADDING = 1;
|
||||||
const IMAGE_WIDTH_THRESHOLD = 25;
|
const IMAGE_WIDTH_THRESHOLD = 25;
|
||||||
const CONTAINER_CLASS = 'c-imagery-tsv-container';
|
const CONTAINER_CLASS = 'c-imagery-tsv-container';
|
||||||
@ -46,6 +49,13 @@ const ID_PREFIX = 'wrapper-';
|
|||||||
export default {
|
export default {
|
||||||
mixins: [imageryData],
|
mixins: [imageryData],
|
||||||
inject: ['openmct', 'domainObject', 'objectPath'],
|
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() {
|
data() {
|
||||||
let timeSystem = this.openmct.time.getTimeSystem();
|
let timeSystem = this.openmct.time.getTimeSystem();
|
||||||
this.metadata = {};
|
this.metadata = {};
|
||||||
@ -60,6 +70,11 @@ export default {
|
|||||||
keyString: undefined
|
keyString: undefined
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
leftOffset() {
|
||||||
|
return this.alignmentData.leftWidth + AXES_PADDING;
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
imageHistory: {
|
imageHistory: {
|
||||||
handler(newHistory, oldHistory) {
|
handler(newHistory, oldHistory) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user