From d8c85bf858c1d4b93053e67e102ccb5c3e821e18 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Fri, 13 Jan 2023 16:49:26 -0800 Subject: [PATCH] Example code for image thumbnail formatter --- src/plugins/imagery/mixins/imageryData.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/imagery/mixins/imageryData.js b/src/plugins/imagery/mixins/imageryData.js index 94118e6813..3e4e83fc03 100644 --- a/src/plugins/imagery/mixins/imageryData.js +++ b/src/plugins/imagery/mixins/imageryData.js @@ -35,9 +35,11 @@ export default { // set this.keyString = this.openmct.objects.makeKeyString(this.domainObject.identifier); this.metadata = this.openmct.telemetry.getMetadata(this.domainObject); - this.imageHints = { ...this.metadata.valuesForHints(['image'])[0] }; + this.imageMetadataValue = { ...this.metadata.valuesForHints(['image'])[0] }; + this.imageThumbnailMetadataValue = { ...this.metadata.valuesForHints(['thumbnail'])[0] }; this.durationFormatter = this.getFormatter(this.timeSystem.durationFormat || DEFAULT_DURATION_FORMATTER); - this.imageFormatter = this.openmct.telemetry.getValueFormatter(this.imageHints); + this.imageFormatter = this.openmct.telemetry.getValueFormatter(this.imageMetadataValue); + this.imageThumbnailFormatter = this.openmct.telemetry.getValueFormatter(this.imageThumbnailMetadataValue); this.imageDownloadNameHints = { ...this.metadata.valuesForHints(['imageDownloadName'])[0]}; // initialize