mirror of
https://github.com/nasa/openmct.git
synced 2025-06-21 00:23:01 +00:00
Elements pool and drag drop (#2196)
* Implemented drag-and-drop composition * Added composition policy for tables * Reimplemented elements pool in Vue * No need to resolve all objects on the navigated path * Only show elements pool in edit mode * Remove old elements pool * Updated legacy code to use composition policy API * Keep object in sync when mutated
This commit is contained in:
committed by
Pete Richards
parent
a296bc2b81
commit
cbcfd44016
@ -36,10 +36,11 @@ define(
|
||||
* @memberof platform/containment
|
||||
* @implements {Policy.<Action, ActionContext>}
|
||||
*/
|
||||
function ComposeActionPolicy($injector) {
|
||||
function ComposeActionPolicy($injector, openmct) {
|
||||
this.getPolicyService = function () {
|
||||
return $injector.get('policyService');
|
||||
};
|
||||
this.openmct = openmct;
|
||||
}
|
||||
|
||||
ComposeActionPolicy.prototype.allowComposition = function (containerObject, selectedObject) {
|
||||
@ -49,11 +50,8 @@ define(
|
||||
|
||||
// ...and delegate to the composition policy
|
||||
return containerObject.getId() !== selectedObject.getId() &&
|
||||
this.policyService.allow(
|
||||
'composition',
|
||||
containerObject,
|
||||
selectedObject
|
||||
);
|
||||
this.openmct.composition.checkPolicy(containerObject.useCapability('adapter'),
|
||||
selectedObject.useCapability('adapter'));
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user