mirror of
https://github.com/nasa/openmct.git
synced 2025-02-21 01:42:31 +00:00
fix: DisplayLayout shapes can be selected and manipulated again (#6289)
fix: handle case where parentObject is undefined - Fixes manipulation of parentless display layout objects such as shapes and lines
This commit is contained in:
parent
b57974b462
commit
5384022a59
@ -109,6 +109,8 @@ import StylesInspectorView from "@/ui/inspector/styles/StylesInspectorView.vue";
|
||||
import SavedStylesInspectorView from "@/ui/inspector/styles/SavedStylesInspectorView.vue";
|
||||
import AnnotationsInspectorView from "./annotations/AnnotationsInspectorView.vue";
|
||||
|
||||
const OVERLAY_PLOT_TYPE = "telemetry.plot.overlay";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
StylesInspectorView,
|
||||
@ -189,12 +191,12 @@ export default {
|
||||
},
|
||||
refreshComposition(selection) {
|
||||
if (selection.length > 0 && selection[0].length > 0) {
|
||||
let parentObject = selection[0][0].context.item;
|
||||
const parentObject = selection[0][0].context.item;
|
||||
|
||||
this.hasComposition = Boolean(
|
||||
parentObject && this.openmct.composition.get(parentObject)
|
||||
);
|
||||
this.isOverlayPlot = selection[0][0].context.item.type === 'telemetry.plot.overlay';
|
||||
this.isOverlayPlot = parentObject?.type === OVERLAY_PLOT_TYPE;
|
||||
}
|
||||
},
|
||||
refreshTabs(selection) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user