Skip to main content

Home > @jsplumbtoolkit/browser-ui-react-drop > DragDropProps

DragDropProps interface

Props for the JsPlumbToolkitDragDropComponent. Most users will probably want to use the SurfaceDropComponent instead.

Signature:

export interface DragDropProps 

Properties

PropertyModifiersTypeDescription
containerElementThe DOM element inside which to look for draggable elements.
dataGenerator?DataGeneratorFunction<any>(Optional) Function to use to get a dataset for an item that is being dragged.
onCanvasDrop?(surface: Surface, data: any, position: PointXY) => any(Optional) Function to call when an item is dropped on whitespace in the canvas
onDrop?(surface: Surface, data: any, target: Node | Group, position: PointXY, draggedElement: Element, e: Event) => any(Optional) Function to call when an item is dropped on ane existing vertex.
onEdgeDrop?(surface: Surface, data: any, edge: Edge, positionOnSurface: PointXY, e: Element, evt: Event, pageLocation: PointXY) => any(Optional) Function to call when an item is dropped on an edge.
selectorstringCSS 3 selector identifying what child elements of container are draggable.
surfaceSurfaceThe surface to attach to.