Drag and drop
This message is sent when the user drop entities somewhere
Headers
type
: DRAG_ENDauthor
: SDK Idrecipients
: Client Idstatus
: SENT
payload
draggedEntities
: List of ARBaseEntityRef, list of entities (if exist) that have been draggeddraggedOnEntities
: List of ARBaseEntityRef,list of entities (if exist) where the drop was donepos
: ARPos, coordinates where the drop was donedraggedType
: entity type of the entity when the drag began (if exist)tags
: tags for additional drag info example: will include TRASHBIN if dragged on trashbinmptAction
: Action proposition for a Route optimizationdraggedFeatures
: List of features (not documented, exclusive use of the SDK)draggedOnFeatures
: List of features (not documented, exclusive use of the SDK)
Info
mptAction
received from the SDK is a proposal based on our standard rules.
Note
The action is not run automatically.
You are free to run it or to build your own action to run.
See Route optimization for an example
Examples
Example of an operation dragged on a route
{
"type": "DRAG_END",
"payload": {
"draggedEntities": [
{
"entityType": "OPERATION",
"id": "OPERATION_06",
"idxSplit": 0
}
],
"draggedOnEntities": [
{
"entityType": "ITINERARY",
"id": "000ZYX1DH01"
}
],
"draggedType": "OPERATION",
"pos": {
"lonLat": [
3.08707028042035,
46.3486168397414
]
},
"tags": [],
"mptAction": {
"type": "SCHEDULE_OPERATIONS_ON_EXISTING_ROUTES",
"operations": [
{
"id": "OPERATION_06"
}
],
"to": {
"idRoute": "000ZYX1DH01"
}
},
"draggedFeatures": [],
"draggedOnFeatures": []
},
"author": "<author id>",
"recipients": [
"<recipient id>"
],
"status": "SENT"
}
Example of an activity dragged on the trashbin
{
"type": "DRAG_END",
"payload": {
"draggedEntities": [
{
"entityType": "ACTIVITY",
"id": "000ZYX1DH01",
"index": 10
}
],
"draggedOnEntities": [],
"draggedType": "ACTIVITY",
"pos": {
"lonLat": [
5.4117040732854,
45.2184017602017
]
},
"tags": [
"TRASHBIN"
],
"mptAction": {
"type": "UNSCHEDULE_OPERATIONS_FROM_EXISTING_ROUTES",
"operations": [
{
"id": "OPERATION_06"
}
]
},
"draggedFeatures": [],
"draggedOnFeatures": []
},
"author": "<author id>",
"recipients": [
"<recipient id>"
],
"status": "SENT"
}