mirror of
https://github.com/nasa/openmct.git
synced 2025-05-03 17:22:56 +00:00
Add root object to object path for legacy context menu actions (#2369)
This commit is contained in:
parent
570aa2c02a
commit
3219a64d09
@ -33,9 +33,13 @@ export default class LegacyContextMenuAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
invoke(objectPath) {
|
invoke(objectPath) {
|
||||||
|
this.openmct.objects.getRoot().then((root) => {
|
||||||
|
let pathWithRoot = objectPath.slice();
|
||||||
|
pathWithRoot.push(root);
|
||||||
|
|
||||||
let context = {
|
let context = {
|
||||||
category: 'contextual',
|
category: 'contextual',
|
||||||
domainObject: this.openmct.legacyObject(objectPath)
|
domainObject: this.openmct.legacyObject(pathWithRoot)
|
||||||
}
|
}
|
||||||
let legacyAction = new this.LegacyAction(context);
|
let legacyAction = new this.LegacyAction(context);
|
||||||
|
|
||||||
@ -47,6 +51,7 @@ export default class LegacyContextMenuAction {
|
|||||||
}.bind(legacyAction);
|
}.bind(legacyAction);
|
||||||
}
|
}
|
||||||
legacyAction.perform();
|
legacyAction.perform();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
appliesTo(objectPath) {
|
appliesTo(objectPath) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user