Skip to main content

Drag and drop

This message is sent when the user drop entities somewhere

Headers

  • type : DRAG_END
  • author : SDK Id
  • recipients : Client Id
  • status : SENT

payload

  • draggedEntities : List of ARBaseEntityRef, list of entities (if exist) that have been dragged
  • draggedOnEntities : List of ARBaseEntityRef,list of entities (if exist) where the drop was done
  • pos : ARPos, coordinates where the drop was done
  • draggedType : entity type of the entity when the drag began (if exist)
  • tags : tags for additional drag info example: will include TRASHBIN if dragged on trashbin
  • mptAction : Action proposition for a Route optimization
  • draggedFeatures : 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"
}