Interface PaletteComponentProps

Props for the PaletteComponent

interface PaletteComponentProps {
    allowDropOnCanvas?: string;
    allowDropOnEdge?: string;
    allowDropOnGroup?: string;
    canvasDropFilter?: CanvasDropFilter<BrowserElement>;
    canvasSelector?: string;
    className?: string;
    dataGenerator?: DataGeneratorFunction<BrowserElement>;
    dragSize?: Size;
    groupIdentifier?: GroupIdentifierFunction<BrowserElement>;
    onVertexAdded?: OnVertexAddedCallback;
    selector: string;
    surface?: Surface;
    typeGenerator?: TypeGeneratorFunction<BrowserElement>;
}

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.

canvasDropFilter?: CanvasDropFilter<BrowserElement>

Optional filter to test if objects may be dropped on the canvas.

canvasSelector?: string

Optional selector specifying what parts of the surface's canvas should be considered whitespace. If you're using a decorator, for instance, you might want to add a selector for that decorator's elements so that items can be dropped onto them.

className?: string

Optional extra css classes to set on the element

dataGenerator?: DataGeneratorFunction<BrowserElement>

Function to use to get a dataset for an item that is being dragged. If omitted, JsPlumb will use a default data generator that extracts data values from any data-jtk-*** attribute on the element being dragged.

dragSize?: Size

Optional size to use for dragged elements.

groupIdentifier?: GroupIdentifierFunction<BrowserElement>

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

onVertexAdded?: OnVertexAddedCallback

Optional callback that will be invoked after a new vertex has been dropped and added to the dataset.

selector: string

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

surface?: Surface

The surface to attach to. Optional: this component can derive a surface from a SurfaceProvider or SurfaceComponent.

typeGenerator?: TypeGeneratorFunction<BrowserElement>

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

Version :