mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 07:08:12 +00:00
[Code Style] Use prototypes in Browse bundle
WTD-1482.
This commit is contained in:
@ -33,24 +33,24 @@ define(
|
||||
* The navigate action navigates to a specific domain object.
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
* @implements {Action}
|
||||
*/
|
||||
function NavigateAction(navigationService, $q, context) {
|
||||
var domainObject = context.domainObject;
|
||||
this.domainObject = context.domainObject;
|
||||
this.$q = $q;
|
||||
this.navigationService = navigationService;
|
||||
}
|
||||
|
||||
function perform() {
|
||||
// Set navigation, and wrap like a promise
|
||||
return $q.when(navigationService.setNavigation(domainObject));
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* Navigate to the object described in the context.
|
||||
* @returns {Promise} a promise that is resolved once the
|
||||
* navigation has been updated
|
||||
* @memberof platform/commonUI/browse.NavigateAction#
|
||||
*/
|
||||
perform: perform
|
||||
};
|
||||
/**
|
||||
* Navigate to the object described in the context.
|
||||
* @returns {Promise} a promise that is resolved once the
|
||||
* navigation has been updated
|
||||
*/
|
||||
NavigateAction.prototype.perform = function () {
|
||||
// Set navigation, and wrap like a promise
|
||||
return this.$q.when(
|
||||
this.navigationService.setNavigation(this.domainObject)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user