mirror of
https://github.com/nasa/openmct.git
synced 2025-03-22 03:55:31 +00:00
added getTypes to types api, modifying which tabs are shown, working on annoatation tab
This commit is contained in:
parent
5be103ea72
commit
e1969585f9
@ -89,6 +89,17 @@ export default class TypeRegistry {
|
||||
get(typeKey) {
|
||||
return this.types[typeKey] || UNKNOWN_TYPE;
|
||||
}
|
||||
/**
|
||||
* List all registered types.
|
||||
* @returns {Type[]} all registered types
|
||||
*/
|
||||
getTypes() {
|
||||
return Object.values(this.types);
|
||||
}
|
||||
/**
|
||||
* Import legacy types.
|
||||
* @param {TypeDefinition[]} types the types to import
|
||||
*/
|
||||
importLegacyTypes(types) {
|
||||
types
|
||||
.filter((t) => this.get(t.key) === UNKNOWN_TYPE)
|
||||
|
@ -91,6 +91,15 @@ export default function StylesInspectorViewProvider(openmct) {
|
||||
);
|
||||
_destroy = destroy;
|
||||
},
|
||||
showTab: function () {
|
||||
const objectSelection = selection?.[0];
|
||||
const objectContext = objectSelection?.[0]?.context;
|
||||
const layoutItem = objectContext?.layoutItem;
|
||||
const domainObject = objectContext?.item;
|
||||
const hasStyles = domainObject?.configuration?.objectStyles;
|
||||
|
||||
return layoutItem || hasStyles;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.priority.DEFAULT;
|
||||
},
|
||||
|
@ -28,6 +28,7 @@ export default class NotebookType {
|
||||
this.description = description;
|
||||
this.cssClass = icon;
|
||||
this.creatable = true;
|
||||
this.annotatable = true;
|
||||
this.form = [
|
||||
{
|
||||
key: 'defaultSort',
|
||||
|
Loading…
x
Reference in New Issue
Block a user