21
21
-->
22
22
23
23
<template>
24
- <div ref="imagery" class="c-imagery-tsv c-timeline-holder ">
24
+ <div ref="imagery" class="c-imagery-tsv js-imagery-tsv ">
25
25
<div ref="imageryHolder" class="c-imagery-tsv__contents u-contents"></div>
26
26
</div>
27
27
</template>
@@ -37,8 +37,6 @@ import { PREVIEW_ACTION_KEY } from '@/ui/preview/PreviewAction.js';
37
37
import imageryData from '../../imagery/mixins/imageryData.js';
38
38
39
39
const PADDING = 1;
40
- const ROW_HEIGHT = 100;
41
- const IMAGE_SIZE = 85;
42
40
const IMAGE_WIDTH_THRESHOLD = 25;
43
41
const CONTAINER_CLASS = 'c-imagery-tsv-container';
44
42
const NO_ITEMS_CLASS = 'c-imagery-tsv__no-items';
@@ -73,9 +71,11 @@ export default {
73
71
mounted() {
74
72
this.previewAction = this.openmct.actions.getAction(PREVIEW_ACTION_KEY);
75
73
76
- this.canvas = this.$refs.imagery.appendChild(document.createElement('canvas'));
77
- this.canvas.height = 0;
78
- this.canvasContext = this.canvas.getContext('2d');
74
+ // Why are we doing this? This element causes scroll problems in the swimlane.
75
+ // this.canvas = this.$refs.imagery.appendChild(document.createElement('canvas'));
76
+ // this.canvas.height = 0;
77
+ // this.canvas.width = 10;
78
+ // this.canvasContext = this.canvas.getContext('2d');
79
79
this.setDimensions();
80
80
81
81
this.setScaleAndPlotImagery = this.setScaleAndPlotImagery.bind(this);
@@ -207,8 +207,8 @@ export default {
207
207
setDimensions() {
208
208
const imageryHolder = this.$refs.imagery;
209
209
this.width = this.getClientWidth();
210
-
211
210
this.height = Math.round(imageryHolder.getBoundingClientRect().height);
211
+ this.imageHeight = this.height - 10;
212
212
},
213
213
setScale(timeSystem) {
214
214
if (!this.width) {
@@ -233,7 +233,6 @@ export default {
233
233
return imageObj.time <= this.viewBounds.end && imageObj.time >= this.viewBounds.start;
234
234
},
235
235
getImageryContainer() {
236
- let containerHeight = 100;
237
236
let containerWidth = this.imageHistory.length ? this.width : 200;
238
237
let imageryContainer;
239
238
@@ -271,7 +270,6 @@ export default {
271
270
272
271
imageryContainer = component.$el.querySelector(`.${CONTAINER_CLASS}`);
273
272
imageryContainer.style.maxWidth = `${containerWidth}px`;
274
- imageryContainer.style.height = `${containerHeight}px`;
275
273
}
276
274
277
275
return imageryContainer;
@@ -380,24 +378,18 @@ export default {
380
378
//create image vertical tick indicator
381
379
let imageTickElement = document.createElement('div');
382
380
imageTickElement.classList.add('c-imagery-tsv__image-handle');
383
- imageTickElement.style.width = '2px';
384
- imageTickElement.style.height = `${String(ROW_HEIGHT - 10)}px`;
385
381
imageWrapper.appendChild(imageTickElement);
386
382
387
383
//create placeholder - this will also hold the actual image
388
384
let imagePlaceholder = document.createElement('div');
389
385
imagePlaceholder.classList.add('c-imagery-tsv__image-placeholder');
390
- imagePlaceholder.style.width = `${IMAGE_SIZE}px`;
391
- imagePlaceholder.style.height = `${IMAGE_SIZE}px`;
392
386
imageWrapper.appendChild(imagePlaceholder);
393
387
394
388
//create image element
395
389
let imageElement = document.createElement('img');
396
390
this.setNSAttributesForElement(imageElement, {
397
391
src: image.thumbnailUrl || image.url
398
392
});
399
- imageElement.style.width = `${IMAGE_SIZE}px`;
400
- imageElement.style.height = `${IMAGE_SIZE}px`;
401
393
this.setImageDisplay(imageElement, showImagePlaceholders);
402
394
403
395
//handle mousedown event to show the image in a large view
0 commit comments