mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 08:25:31 +00:00
[Containment] Fix bundle
Fix dependencies in containment bundle to allow loading, WTD-962.
This commit is contained in:
parent
24b1e3134e
commit
9e4611bcfd
@ -4,7 +4,7 @@
|
||||
{
|
||||
"category": "composition",
|
||||
"implementation": "CompositionPolicy.js",
|
||||
"depends": [ "typeService", "capabilityService" ],
|
||||
"depends": [ "$injector" ],
|
||||
"message": "Objects of this type cannot contain objects of that type."
|
||||
},
|
||||
{
|
||||
|
@ -53,5 +53,7 @@ define(
|
||||
};
|
||||
}
|
||||
|
||||
return ComposeActionPolicy;
|
||||
|
||||
}
|
||||
);
|
@ -8,10 +8,17 @@ define(
|
||||
/**
|
||||
* Defines composition policy as driven by type metadata.
|
||||
*/
|
||||
function CompositionPolicy(typeService, capabilityService) {
|
||||
function CompositionPolicy($injector) {
|
||||
// We're really just wrapping the containment table and rephrasing
|
||||
// it as a policy decision.
|
||||
var table = new ContainmentTable(typeService, capabilityService);
|
||||
var table;
|
||||
|
||||
function getTable() {
|
||||
return (table = table || new ContainmentTable(
|
||||
$injector.get('typeService'),
|
||||
$injector.get('capabilityService')
|
||||
));
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
@ -19,7 +26,7 @@ define(
|
||||
* contain the type described by the context?
|
||||
*/
|
||||
allow: function (candidate, context) {
|
||||
return table.canContain(candidate, context);
|
||||
return getTable().canContain(candidate, context);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -231,6 +231,7 @@
|
||||
"description": "A panel for collecting telemetry elements.",
|
||||
"delegates": [ "telemetry" ],
|
||||
"features": "creation",
|
||||
"contains": [ { "has": "telemetry" } ],
|
||||
"model": { "composition": [] },
|
||||
"properties": [
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user