Drop Action

DropAction handles drop on Visualizer. If a pre-processing step is needed to validate whether to accept the drop, it is specified in the Diagrammer.requestManager via a RequestDescriptor:

The Drop Action takes a DropActionData.as as input. This data is described through two properties:

Property Description
isGroupFunction This function takes an object data as input and will return a boolean that indicates whether data presents a group
isTableFunction This functidon takes an object data as input and will return a boolean that indicates whether data presents a table
dataCloneFunction This function clone any dropped data. This function should be used in case where Diagrammer uses ILib instances and a LibSelector for drag&drop. The function takes as input the dropped data and returns a cloned data that can be used in the corresponding node.
positionPolicy A position policy value defining how dropped items are positioned. The dropped item may be positionned in a manner where its center or top left corner coincides with the mouse position. If positionCorrectionFunction is set to a non null value, this property is ignored. There are two position policy that can be choosen through PositionConstants:
  • CENTER_ON_MOUSE_POSITION
  • TOP_LEFT_ON_MOUSE_POSITION
positionCorrectionFunction Function having as input the dropped node and not returning any value. In the function, the developer should be able to modify the node position on the node itself.