Compare commits

...

1 Commits

Author SHA1 Message Date
8f45758350 Add root object to object path for legacy context menu actions 2019-04-09 17:26:34 -07:00

View File

@ -33,9 +33,13 @@ export default class LegacyContextMenuAction {
}
invoke(objectPath) {
this.openmct.objects.getRoot().then((root) => {
let pathWithRoot = objectPath.slice();
pathWithRoot.push(root);
let context = {
category: 'contextual',
domainObject: this.openmct.legacyObject(objectPath)
domainObject: this.openmct.legacyObject(pathWithRoot)
}
let legacyAction = new this.LegacyAction(context);
@ -47,6 +51,7 @@ export default class LegacyContextMenuAction {
}.bind(legacyAction);
}
legacyAction.perform();
});
}
appliesTo(objectPath) {