mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 07:38:15 +00:00
Drag and drop fixes (#2249)
* Drag-drop edit mode from capture handler. Drag-drop composition from bubble handler. Check composability on drag start * Show drop hints without being in edit mode. * Don't serialize objects twice on drag
This commit is contained in:
committed by
Pete Richards
parent
cb1a1c2616
commit
4084a1ac86
@ -44,7 +44,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
dragStart(event) {
|
||||
event.dataTransfer.setData("domainObject", JSON.stringify(this.observedObject));
|
||||
let navigatedObject = this.openmct.router.path[0];
|
||||
let serializedObject = JSON.stringify(this.observedObject);
|
||||
if (this.openmct.composition.checkPolicy(navigatedObject, this.observedObject)) {
|
||||
event.dataTransfer.setData("openmct/composable-domain-object", serializedObject);
|
||||
}
|
||||
event.dataTransfer.setData("openmct/domain-object", serializedObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user