mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 08:03:49 +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:
@ -109,6 +109,8 @@ import StylesInspectorView from "@/ui/inspector/styles/StylesInspectorView.vue";
|
|||||||
import SavedStylesInspectorView from "@/ui/inspector/styles/SavedStylesInspectorView.vue";
|
import SavedStylesInspectorView from "@/ui/inspector/styles/SavedStylesInspectorView.vue";
|
||||||
import AnnotationsInspectorView from "./annotations/AnnotationsInspectorView.vue";
|
import AnnotationsInspectorView from "./annotations/AnnotationsInspectorView.vue";
|
||||||
|
|
||||||
|
const OVERLAY_PLOT_TYPE = "telemetry.plot.overlay";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
StylesInspectorView,
|
StylesInspectorView,
|
||||||
@ -189,12 +191,12 @@ export default {
|
|||||||
},
|
},
|
||||||
refreshComposition(selection) {
|
refreshComposition(selection) {
|
||||||
if (selection.length > 0 && selection[0].length > 0) {
|
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(
|
this.hasComposition = Boolean(
|
||||||
parentObject && this.openmct.composition.get(parentObject)
|
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) {
|
refreshTabs(selection) {
|
||||||
|
Reference in New Issue
Block a user