mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 08:03:49 +00:00
[Views] Repair view registry for mainViews (#1308)
* [Views] Rewrite mct-view ...to make it a simple way to include non-Angular views, without integrating unnecessarily with other architectural concerns. Supports restoration of view registration functionality to fix #1307 * [API] Use identifier as property name * [API] Add adapter capability ...to simplify adapter layer (allowing new-style objects to be retrieved via capability.) * [API] Add AdaptedViewController * [API] Add template for adapted views * [API] Add AdaptedViewPolicy * [API] Wire in view adapter * [API] Fix adapter capability implementation * [API] Don't create new scope from mct-view ...to allow use on same element as ng-controller (and because a new scope just is not necessary.)
This commit is contained in:
committed by
Pete Richards
parent
025b69541e
commit
547696d797
@ -78,7 +78,7 @@ define([
|
||||
// Converts composition to use key strings instead of keys
|
||||
var toOldFormat = function (model) {
|
||||
model = JSON.parse(JSON.stringify(model));
|
||||
delete model.key;
|
||||
delete model.identifier;
|
||||
if (model.composition) {
|
||||
model.composition = model.composition.map(makeKeyString);
|
||||
}
|
||||
@ -86,9 +86,9 @@ define([
|
||||
};
|
||||
|
||||
// converts composition to use keys instead of key strings
|
||||
var toNewFormat = function (model, key) {
|
||||
var toNewFormat = function (model, identifier) {
|
||||
model = JSON.parse(JSON.stringify(model));
|
||||
model.key = key;
|
||||
model.identifier = parseKeyString(identifier);
|
||||
if (model.composition) {
|
||||
model.composition = model.composition.map(parseKeyString);
|
||||
}
|
||||
|
Reference in New Issue
Block a user