Props for SurfaceDropComponent

interface SurfaceDropProps {
    allowDropOnCanvas?: string;
    allowDropOnEdge?: string;
    allowDropOnGroup?: string;
    container: Element;
    dataGenerator?: DataGeneratorFunction<any>;
    groupIdentifier?: ((d, el) => boolean);
    selector: string;
    surface: Surface;
    typeGenerator?: ((el) => string);
}

Properties

allowDropOnCanvas?: string

Whether or not to allow drop on whitespace in the canvas. Defaults to true.

allowDropOnEdge?: string

Whether or not to allow drop on edge. Defaults to false.

allowDropOnGroup?: string

Whether or not to allow drop on existing vertices. Defaults to true.

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.

groupIdentifier?: ((d, el) => boolean)

Function to use to determine whether an item that is being dragged represents a group.

Type declaration

    • (d, el): boolean
    • Parameters

      • d: any
      • el: Element

      Returns boolean

selector: string

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

surface: Surface

Surface to attach to

typeGenerator?: ((el) => string)

Function to use to get the type of an item that is being dragged.

Type declaration

    • (el): string
    • Parameters

      • el: Element

      Returns string

Version :