mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
[Display Layout] Add delete button (#2251)
* Add delete button in the toolbar for removing items * Mutate composition if there are no telemetry objects. Select the parent layout after deleting an item. * Saving work * Watch for index in the components and update it in the context. * Select the parent after a composition is removed. * Address reviewer's feedback. - Rename mutatComposition() to removeFromComposition(). - Inline logic for filtering composition - Use separate branches for each item type in trackItem(). * Address reviewer's requested changes
This commit is contained in:
committed by
Pete Richards
parent
47a07da17d
commit
464e5de947
@ -75,16 +75,22 @@
|
||||
};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
index(newIndex) {
|
||||
if (!this.context) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.context.index = newIndex;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let context = {
|
||||
this.context = {
|
||||
layoutItem: this.item,
|
||||
index: this.index
|
||||
};
|
||||
this.removeSelectable = this.openmct.selection.selectable(
|
||||
this.$el,
|
||||
context,
|
||||
this.initSelect
|
||||
);
|
||||
this.$el, this.context, this.initSelect);
|
||||
},
|
||||
destroyed() {
|
||||
if (this.removeSelectable) {
|
||||
|
Reference in New Issue
Block a user