Example code for image thumbnail formatter

This commit is contained in:
Andrew Henry 2023-01-13 16:49:26 -08:00
parent cdb202d8ba
commit d8c85bf858

View File

@ -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