File tree 1 file changed +6
-12
lines changed
1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change 21
21
*****************************************************************************/
22
22
23
23
define ( [ ] , function ( ) {
24
- function AdapterCompositionPolicy ( mct ) {
25
- this . mct = mct ;
24
+ function AdapterCompositionPolicy ( openmct ) {
25
+ this . openmct = openmct ;
26
26
}
27
27
28
28
AdapterCompositionPolicy . prototype . allow = function (
@@ -32,16 +32,10 @@ define([], function () {
32
32
var containerObject = containerType . getInitialModel ( ) ;
33
33
var childObject = childType . getInitialModel ( ) ;
34
34
35
- containerObject . type = containerType . getKey ( ) ;
36
- childObject . type = childType . getKey ( ) ;
37
-
38
- var composition = this . mct . Composition ( containerObject ) ;
39
-
40
- if ( composition ) {
41
- return composition . canContain ( childObject ) ;
42
- }
43
-
44
- return true ;
35
+ return this . openmct . composition . checkPolicy (
36
+ containerObject ,
37
+ childObject
38
+ ) ;
45
39
} ;
46
40
47
41
return AdapterCompositionPolicy ;
You can’t perform that action at this time.
0 commit comments