diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index ee7df5719a..4a81197266 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -25,8 +25,8 @@ * @namespace platform/commonUI/browse */ define( - [], - function () { + ['lodash'], + function (_) { /** * The BrowseController is used to populate the initial scope in Browse @@ -157,12 +157,28 @@ define( // (e.g. bookmarks to pages in OpenMCT) and prevent them. Instead, // navigate to the path ourselves, which results in it being // properly set. - $scope.$on('$routeChangeStart', function (event, route) { + $scope.$on('$routeChangeStart', function (event, route, oldRoute) { if (route.$$route === $route.current.$$route) { if (route.pathParams.ids && route.pathParams.ids !== $route.current.pathParams.ids) { + + var otherParams = _.omit(route.params, 'ids'); + var oldOtherParams = _.omit(oldRoute.params, 'ids'); + var deletedParams = _.omit(oldOtherParams, _.keys(otherParams)); + event.preventDefault(); - navigateToPath(route.pathParams.ids.split('/')); + + navigateToPath(route.pathParams.ids.split('/')) + .then(function () { + if (!_.isEqual(otherParams, oldOtherParams)) { + _.forEach(otherParams, function (v, k) { + $location.search(k, v); + }); + _.forEach(deletedParams, function (k) { + $location.search(k, null); + }); + } + }); } else { navigateToPath([]); } diff --git a/src/adapter/runs/TimeSettingsURLHandler.js b/src/adapter/runs/TimeSettingsURLHandler.js index f97165ff1e..b50807866e 100644 --- a/src/adapter/runs/TimeSettingsURLHandler.js +++ b/src/adapter/runs/TimeSettingsURLHandler.js @@ -107,7 +107,7 @@ define([ } this.last = params; - if (params.bounds) { + if (params.clock === 'fixed' && params.bounds) { if (!this.time.timeSystem() || this.time.timeSystem().key !== params.timeSystem) {