mirror of
https://github.com/nasa/openmct.git
synced 2024-12-29 17:38:53 +00:00
[Addressability] Expose current view in query param
Expose the currently selected view as a query string parameter, WTD-1149.
This commit is contained in:
parent
fec6f06849
commit
d559dae1e2
@ -47,7 +47,14 @@ define(
|
||||
}
|
||||
}
|
||||
|
||||
function updateQueryParam(viewKey) {
|
||||
if (viewKey) {
|
||||
$location.search('view', viewKey);
|
||||
}
|
||||
}
|
||||
|
||||
$scope.$watch('domainObject', setViewForDomainObject);
|
||||
$scope.$watch('representation.selected.key', updateQueryParam);
|
||||
}
|
||||
|
||||
return BrowseObjectController;
|
||||
|
@ -53,7 +53,7 @@ define(
|
||||
|
||||
// Get list of views, read from capability
|
||||
function updateOptions(views) {
|
||||
if (Array.isArray(views)) {
|
||||
if (Array.isArray(views) && !($scope.ngModel || {}).selected) {
|
||||
$timeout(function () {
|
||||
$scope.ngModel.selected = findMatchingOption(
|
||||
views,
|
||||
|
Loading…
Reference in New Issue
Block a user