Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds new check to clearData that enables data clearing on overlay plots. #7961

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/plugins/plot/MctPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,21 @@
);
});
},
plotCompositionContainsId(domainObjectToFind) {
if (!this.domainObject.composition) {
return false;

Check warning on line 739 in src/plugins/plot/MctPlot.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/plot/MctPlot.vue#L739

Added line #L739 was not covered by tests
}
if (!domainObjectToFind.identifier) {
return false;

Check warning on line 742 in src/plugins/plot/MctPlot.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/plot/MctPlot.vue#L742

Added line #L742 was not covered by tests
}

return this.domainObject.composition.some((compositionIdentifier) => {
return this.openmct.objects.areIdsEqual(

Check warning on line 746 in src/plugins/plot/MctPlot.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/plot/MctPlot.vue#L745-L746

Added lines #L745 - L746 were not covered by tests
compositionIdentifier,
domainObjectToFind.identifier
);
});
},

clearData(domainObjectToClear) {
// If we don't have an object to clear (global), or the IDs are equal, just clear the data.
Expand All @@ -747,7 +762,8 @@
domainObjectToClear.identifier,
this.domainObject.identifier
) ||
this.compositionPathContainsId(domainObjectToClear)
this.compositionPathContainsId(domainObjectToClear) ||
this.plotCompositionContainsId(domainObjectToClear)
) {
this.clearSeries();
}
Expand Down