1.8.2 merge into master - the version of open mct after the last but equally as important (#4611)

* Release 1.8.2

* Trasactions tests are ids equal fix 1.8.2 (#4593)

* test fix

* return promise on 'onSave'

* "Export as JSON" yielding corrupted data #4577 (#4585)

https://github.com/nasa/openmct/issues/4577

* Fix date picker default time setting (#4581)

Fix mode dropdown position
Fix unlistening of upstream events

* Bar graph composition policy fix to allow condition set creation. (#4598)

* Use image timestamp instead of image index to show large view (#4591)

* Use image timestamp instead of image index to show large view

* Fix failing test

Co-authored-by: Nikhil <nikhil.k.mandlik@nasa.gov>
This commit is contained in:
Shefali Joshi
2021-12-17 12:57:49 -08:00
committed by GitHub
parent 2d64813a4f
commit 70f2fad243
10 changed files with 39 additions and 31 deletions

View File

@@ -201,7 +201,7 @@ export default {
mixins: [imageryData],
inject: ['openmct', 'domainObject', 'objectPath', 'currentView'],
props: {
indexForFocusedImage: {
focusedImageTimestamp: {
type: Number,
default() {
return undefined;
@@ -411,8 +411,11 @@ export default {
watch: {
imageHistorySize(newSize, oldSize) {
let imageIndex;
if (this.indexForFocusedImage !== undefined) {
imageIndex = this.initFocusedImageIndex;
if (this.focusedImageTimestamp !== undefined) {
const foundImageIndex = this.imageHistory.findIndex(image => {
return image.time === this.focusedImageTimestamp;
});
imageIndex = foundImageIndex > -1 ? foundImageIndex : newSize - 1;
} else {
imageIndex = newSize > 0 ? newSize - 1 : undefined;
}
@@ -429,8 +432,7 @@ export default {
},
async mounted() {
//We only need to use this till the user focuses an image manually
if (this.indexForFocusedImage !== undefined) {
this.initFocusedImageIndex = this.indexForFocusedImage;
if (this.focusedImageTimestamp !== undefined) {
this.isPaused = true;
}
@@ -701,10 +703,10 @@ export default {
if (thumbnailClick) {
//We use the props till the user changes what they want to see
this.initFocusedImageIndex = undefined;
this.focusedImageTimestamp = undefined;
}
if (this.isPaused && !thumbnailClick && this.initFocusedImageIndex === undefined) {
if (this.isPaused && !thumbnailClick && this.focusedImageTimestamp === undefined) {
this.nextImageIndex = focusedIndex;
//this could happen if bounds changes
if (this.focusedImageIndex > this.imageHistory.length - 1) {