From 12b7c0e805eadc72fca836285bd05a232c756f1f Mon Sep 17 00:00:00 2001 From: Jesse Mazzella Date: Thu, 1 Jun 2023 11:31:18 -0700 Subject: [PATCH] docs: add comment --- .../inspectorViews/annotations/AnnotationsInspectorView.vue | 2 ++ src/ui/layout/search/AnnotationSearchResult.vue | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/inspectorViews/annotations/AnnotationsInspectorView.vue b/src/plugins/inspectorViews/annotations/AnnotationsInspectorView.vue index c26f7e60c9..109c1752fc 100644 --- a/src/plugins/inspectorViews/annotations/AnnotationsInspectorView.vue +++ b/src/plugins/inspectorViews/annotations/AnnotationsInspectorView.vue @@ -192,6 +192,8 @@ export default { }, async loadAnnotationForTargetObject(target) { const targetID = this.openmct.objects.makeKeyString(target.identifier); + // If the user changes targets while annotations are loading, + // abort the previous request. if (this.abortController !== null) { this.abortController.abort(); } diff --git a/src/ui/layout/search/AnnotationSearchResult.vue b/src/ui/layout/search/AnnotationSearchResult.vue index 7ad0fd79e4..b3ee9a2ec5 100644 --- a/src/ui/layout/search/AnnotationSearchResult.vue +++ b/src/ui/layout/search/AnnotationSearchResult.vue @@ -98,7 +98,9 @@ export default { } return 'Could not find any matching Notebook entries'; - } else if (this.result.annotationType === this.openmct.annotation.ANNOTATION_TYPES.GEOSPATIAL) { + } else if ( + this.result.annotationType === this.openmct.annotation.ANNOTATION_TYPES.GEOSPATIAL + ) { const targetID = Object.keys(this.result.targets)[0]; const { layerName, name } = this.result.targets[targetID];