mirror of
https://github.com/nasa/openmct.git
synced 2025-04-26 22:10:03 +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",
|
"category": "composition",
|
||||||
"implementation": "CompositionPolicy.js",
|
"implementation": "CompositionPolicy.js",
|
||||||
"depends": [ "typeService", "capabilityService" ],
|
"depends": [ "$injector" ],
|
||||||
"message": "Objects of this type cannot contain objects of that type."
|
"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.
|
* 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
|
// We're really just wrapping the containment table and rephrasing
|
||||||
// it as a policy decision.
|
// 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 {
|
return {
|
||||||
/**
|
/**
|
||||||
@ -19,7 +26,7 @@ define(
|
|||||||
* contain the type described by the context?
|
* contain the type described by the context?
|
||||||
*/
|
*/
|
||||||
allow: function (candidate, 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.",
|
"description": "A panel for collecting telemetry elements.",
|
||||||
"delegates": [ "telemetry" ],
|
"delegates": [ "telemetry" ],
|
||||||
"features": "creation",
|
"features": "creation",
|
||||||
|
"contains": [ { "has": "telemetry" } ],
|
||||||
"model": { "composition": [] },
|
"model": { "composition": [] },
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user