mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 08:25:31 +00:00
Show the Styles tab for non creatable layout objects including condition sets (#2975)
This commit is contained in:
parent
95f73d8eb8
commit
ea90d02d66
@ -108,7 +108,7 @@ export default {
|
||||
let object = selection[0][0].context.item;
|
||||
if (object) {
|
||||
let type = this.openmct.types.get(object.type);
|
||||
this.showStyles = (this.excludeObjectTypes.indexOf(object.type) < 0) && type.definition.creatable;
|
||||
this.showStyles = this.isLayoutObject(selection[0], object.type) || this.isCreatableObject(object, type);
|
||||
}
|
||||
if (!this.currentTabbedView.key || (!this.showStyles && this.currentTabbedView.key === this.tabbedViews[1].key))
|
||||
{
|
||||
@ -116,6 +116,14 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
isLayoutObject(selection, objectType) {
|
||||
//we allow conditionSets to be styled if they're part of a layout
|
||||
return selection.length > 1 &&
|
||||
((objectType === 'conditionSet') || (this.excludeObjectTypes.indexOf(objectType) < 0));
|
||||
},
|
||||
isCreatableObject(object, type) {
|
||||
return (this.excludeObjectTypes.indexOf(object.type) < 0) && type.definition.creatable;
|
||||
},
|
||||
updateCurrentTab(view) {
|
||||
this.currentTabbedView = view;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user