Suppress annotations tab if no annotations defined (#6498)

* fix bad copy paste

* suppress annotations inspector tab if no tags
This commit is contained in:
David Tsay 2023-03-23 14:00:46 -07:00 committed by GitHub
parent 4aa572d489
commit f39f8df4e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,11 +23,17 @@
import Annotations from './AnnotationsInspectorView.vue';
import Vue from 'vue';
export default function ElementsViewProvider(openmct) {
export default function AnnotationsViewProvider(openmct) {
return {
key: 'annotationsView',
name: 'Annotations',
canView: function (selection) {
const availableTags = openmct.annotation.getAvailableTags();
if (availableTags.length < 1) {
return false;
}
return selection.length;
},
view: function (selection) {