mirror of
https://github.com/nasa/openmct.git
synced 2024-12-21 14:07:50 +00:00
added persist for remove
This commit is contained in:
parent
2d8f61172d
commit
4d263bcf32
@ -137,16 +137,22 @@ export default {
|
||||
this.conditions[index] = updatedCondition;
|
||||
},
|
||||
removeCondition(identifier) {
|
||||
console.log('this.conditions', this.conditions);
|
||||
let index = _.findIndex(this.conditionCollection, (condition) => {
|
||||
identifier.key === condition.key
|
||||
});
|
||||
this.conditionCollection.splice(index + 1, 1);
|
||||
this.persist();
|
||||
},
|
||||
reorder(reorderPlan) {
|
||||
let oldConditions = this.conditionCollection.slice();
|
||||
reorderPlan.forEach((reorderEvent) => {
|
||||
this.$set(this.conditionCollection, reorderEvent.newIndex, oldConditions[reorderEvent.oldIndex]);
|
||||
});
|
||||
},
|
||||
persist() {
|
||||
console.log('this.domainObject', this.domainObject);
|
||||
this.openmct.objects.mutate(this.domainObject, 'configuration.conditionCollection', this.conditionCollection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -176,14 +176,8 @@ export default {
|
||||
this.persist();
|
||||
},
|
||||
methods: {
|
||||
removeCondition(ev) {
|
||||
removeCondition() {
|
||||
this.$emit('remove-condition', this.conditionIdentifier);
|
||||
// const conditionDiv = ev.target.closest('.conditionArea');
|
||||
// const conditionCollectionDiv = conditionDiv.closest('.condition-collection');
|
||||
// const index = Array.from(conditionCollectionDiv.children).indexOf(conditionDiv);
|
||||
|
||||
// this.domainObject.configuration.conditionCollection.splice(index, 1);
|
||||
// this.updateCurrentCondition();
|
||||
},
|
||||
updateTelemetry() {
|
||||
if (this.hasTelemetry()) {
|
||||
|
Loading…
Reference in New Issue
Block a user