mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 07:08:12 +00:00
[Common UI] Initial commonUI bundles
Bring in work on general-purpose and over-arching user interface bundles from the sandbox transition branch. WTD-574.
This commit is contained in:
35
platform/commonUI/browse/src/navigation/NavigateAction.js
Normal file
35
platform/commonUI/browse/src/navigation/NavigateAction.js
Normal file
@ -0,0 +1,35 @@
|
||||
/*global define,Promise*/
|
||||
|
||||
/**
|
||||
* Module defining NavigateAction. Created by vwoeltje on 11/10/14.
|
||||
*/
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
function NavigateAction(navigationService, context) {
|
||||
var domainObject = context.domainObject;
|
||||
|
||||
function perform() {
|
||||
return Promise.resolve(
|
||||
navigationService.setNavigation(domainObject)
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
perform: perform
|
||||
};
|
||||
}
|
||||
|
||||
NavigateAction.appliesTo = function (context) {
|
||||
return context.domainObject !== undefined;
|
||||
};
|
||||
|
||||
return NavigateAction;
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user