mirror of
https://github.com/nasa/openmct.git
synced 2025-02-21 17:57:04 +00:00
[API] Add containment methods
This commit is contained in:
parent
1147f3aa47
commit
11409ce509
@ -94,6 +94,10 @@ define([
|
||||
}
|
||||
};
|
||||
|
||||
CompositionCollection.prototype.canContain = function (domainObject) {
|
||||
return this.provider.canContain(this.domainObject, domainObject);
|
||||
};
|
||||
|
||||
CompositionCollection.prototype.destroy = function () {
|
||||
if (this.provider.off) {
|
||||
this.provider.off(
|
||||
|
@ -59,6 +59,10 @@ define([
|
||||
);
|
||||
};
|
||||
|
||||
DefaultCompositionProvider.prototype.canContain = function (domainObject, child) {
|
||||
return true;
|
||||
};
|
||||
|
||||
DefaultCompositionProvider.prototype.remove = function (domainObject, child) {
|
||||
// TODO: this needs to be synchronized via mutation
|
||||
var index = domainObject.composition.indexOf(child);
|
||||
|
Loading…
x
Reference in New Issue
Block a user