mirror of
https://github.com/nasa/openmct.git
synced 2024-12-25 07:41:06 +00:00
[New Edit Mode] #659 Fix to prevent multi-composition with same object, fix to prevent composition of object with self
This commit is contained in:
parent
668c02f278
commit
10e0acddb3
platform
containment/src
features/timeline
@ -55,11 +55,12 @@ define(
|
||||
this.policyService = this.policyService || this.getPolicyService();
|
||||
|
||||
// ...and delegate to the composition policy
|
||||
return this.policyService.allow(
|
||||
'composition',
|
||||
containerType,
|
||||
selectedType
|
||||
);
|
||||
return containerObject.getId() !== selectedObject.getId() &&
|
||||
this.policyService.allow(
|
||||
'composition',
|
||||
containerType,
|
||||
selectedType
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -85,6 +85,7 @@ define(
|
||||
);
|
||||
|
||||
if (id) {
|
||||
event.stopPropagation();
|
||||
// Delegate the drop to the swimlane itself
|
||||
swimlane.drop(id, (draggedSwimlane || {}).domainObject);
|
||||
}
|
||||
|
@ -87,7 +87,8 @@ define(
|
||||
testEvent = {
|
||||
pageY: TEST_TOP + TEST_HEIGHT / 10,
|
||||
dataTransfer: { getData: jasmine.createSpy() },
|
||||
preventDefault: jasmine.createSpy()
|
||||
preventDefault: jasmine.createSpy(),
|
||||
stopPropagation: jasmine.createSpy()
|
||||
};
|
||||
|
||||
testEvent.dataTransfer.getData.andReturn('abc');
|
||||
|
Loading…
Reference in New Issue
Block a user