mirror of
https://github.com/nasa/openmct.git
synced 2025-03-10 22:43:55 +00:00
[Addressability] Preserve nav. state on leaving Edit
Preserve navigation state when leaving Edit mode, in the context of addressability changes. WTD-1149.
This commit is contained in:
parent
3738ea16d7
commit
d7b79b6b69
@ -43,7 +43,7 @@ define(
|
||||
*/
|
||||
function BrowseController($scope, $route, $location, objectService, navigationService) {
|
||||
var path = [ROOT_ID].concat(
|
||||
($route.current.ids || DEFAULT_PATH).split("/")
|
||||
($route.current.params.ids || DEFAULT_PATH).split("/")
|
||||
);
|
||||
|
||||
function updateRoute(domainObject) {
|
||||
@ -73,13 +73,16 @@ define(
|
||||
|
||||
function navigateTo(domainObject) {
|
||||
// Check if an object has been navigated-to already...
|
||||
if (!navigationService.getNavigation()) {
|
||||
// If not, or if an ID path has been explicitly set in the URL,
|
||||
// navigate to the URL-specified object.
|
||||
if (!navigationService.getNavigation() || $route.current.params.ids) {
|
||||
// If not, pick a default as the last
|
||||
// root-level component (usually "mine")
|
||||
navigationService.setNavigation(domainObject);
|
||||
} else {
|
||||
// Otherwise, just expose it in the scope
|
||||
// Otherwise, just expose the currently navigated object.
|
||||
$scope.navigatedObject = navigationService.getNavigation();
|
||||
updateRoute($scope.navigatedObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user