diff --git a/src/api/annotation/AnnotationAPI.js b/src/api/annotation/AnnotationAPI.js index f6da19d2b9..b93ec0c0ff 100644 --- a/src/api/annotation/AnnotationAPI.js +++ b/src/api/annotation/AnnotationAPI.js @@ -601,7 +601,6 @@ export default class AnnotationAPI extends EventEmitter { * @returns {boolean} Returns true if the type is annotatable */ isAnnotatableType(type) { - console.log('type', type, this.annotatableTypes); return this.annotatableTypes.some((annotatableType) => annotatableType === type); } } diff --git a/src/plugins/inspectorViews/annotations/AnnotationsViewProvider.js b/src/plugins/inspectorViews/annotations/AnnotationsViewProvider.js index 970f3ee79a..bbfc9b98b1 100644 --- a/src/plugins/inspectorViews/annotations/AnnotationsViewProvider.js +++ b/src/plugins/inspectorViews/annotations/AnnotationsViewProvider.js @@ -40,7 +40,9 @@ export default function AnnotationsViewProvider(openmct) { view: function (selection) { let _destroy = null; - const domainObject = selection?.[0]?.[0]?.context?.item; + const selectionContext = selection?.[0]?.[0]?.context; + const domainObject = selectionContext?.item; + const isLayoutItem = selectionContext?.layoutItem; return { show: function (element) { @@ -64,6 +66,10 @@ export default function AnnotationsViewProvider(openmct) { _destroy = destroy; }, showTab: function () { + if (isLayoutItem) { + return false; + } + const isAnnotatableType = openmct.annotation.isAnnotatableType(domainObject.type); const metadata = openmct.telemetry.getMetadata(domainObject); const hasImagery = metadata?.valuesForHints(['image']).length > 0;