mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 08:03:49 +00:00
* [#4378] Emit event when router path is set. Handle the event when creating an object Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
@ -86,11 +86,20 @@ define(
|
||||
})
|
||||
.join('/');
|
||||
|
||||
openmct.router.navigate(url);
|
||||
function editObject() {
|
||||
const path = objectPath.slice(-1).map(obj => {
|
||||
const objNew = obj.getCapability('adapter').invoke();
|
||||
|
||||
if (isFirstViewEditable(object.useCapability('adapter'), objectPath)) {
|
||||
openmct.editor.edit();
|
||||
return objNew;
|
||||
});
|
||||
if (isFirstViewEditable(object.useCapability('adapter'), path)) {
|
||||
openmct.editor.edit();
|
||||
}
|
||||
}
|
||||
|
||||
openmct.router.once('afterNavigation', editObject);
|
||||
|
||||
openmct.router.navigate(url);
|
||||
}
|
||||
|
||||
newModel.type = this.type.getKey();
|
||||
|
Reference in New Issue
Block a user