Interface JsPlumbToolkitDragDropProps

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

interface JsPlumbToolkitDragDropProps {
    container: Element;
    dataGenerator?: DataGeneratorFunction<any>;
    onCanvasDrop?: ((surface: Surface, data: any, position: PointXY) => any);
    onDrop?: ((surface: Surface, data: any, target: Node | Group, position: PointXY, draggedElement: BrowserElement, e: Event) => any);
    onEdgeDrop?: ((surface: Surface, data: any, edge: Edge, positionOnSurface: PointXY, e: BrowserElement, evt: Event, pageLocation: PointXY) => any);
    selector: string;
    surface: Surface;
}

Properties

container: Element

The DOM element inside which to look for draggable elements.

dataGenerator?: DataGeneratorFunction<any>

Function to use to get a dataset for an item that is being dragged.

onCanvasDrop?: ((surface: Surface, data: any, position: PointXY) => any)

Function to call when an item is dropped on whitespace in the canvas

onDrop?: ((surface: Surface, data: any, target: Node | Group, position: PointXY, draggedElement: BrowserElement, e: Event) => any)

Function to call when an item is dropped on ane existing vertex.

onEdgeDrop?: ((surface: Surface, data: any, edge: Edge, positionOnSurface: PointXY, e: BrowserElement, evt: Event, pageLocation: PointXY) => any)

Function to call when an item is dropped on an edge.

selector: string

CSS 3 selector identifying what child elements of container are draggable.

surface: Surface

The surface to attach to.

Version :