Class SurfaceDropComponent<T>

This directive provides a means for you to configure the ability to drag/drop nodes and groups from some part of your UI into the canvas.

Type Parameters

  • T

Properties

allowDropOnCanvas: string

Defaults to true. Allows items to be dropped onto whitespace.

allowDropOnEdge: string

Defaults to true. Allows items to be dropped onto edges in the canvas.

allowDropOnGroup: string

Defaults to true. Allows items to be dropped onto groups in the canvas.

allowDropOnNode: string

Defaults to false. Allows items to be dropped onto nodes in the canvas. If this is true and an element is dropped onto a node, the result is the same as if the element has been dropped onto whitespace.

canvasDropFilter?: CanvasDropFilter<T>

Optional filter to test if objects may be dropped on the canvas. This method is invoked at the start of a drag and is passed the candidate drag object's data.

canvasSelector: string

Optional extra selector to use when dragging to identify parts of the surface's canvas that should be considered whitespace. If you use a decorator, for instance, or have otherwise positioned elements on your canvas, these elements will not by default be considered whitespace.

dataGenerator?: DataGeneratorFunction<T>

Function to use to generate an initial payload when the user starts to drag something from this component. Optional, and 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<T>

Optional function to use to determine if the object that is being dragged represents a group. If this function is present, and returns true, then the drag object is considered to be a group. In all other cases the drag object is considered to be a node.

onVertexAdded?: OnVertexAddedCallback

Optional callback for when a new vertex has been added via this component.

selector?: string

CSS3 selector identifying the child elements of the the element on which this directive was declared that act as drag sources. Optional; if omitted JsPlumb will use DEFAULT_PALETTE_SELECTOR.

surfaceId?: string = DEFAULT_ANGULAR_SURFACE_ID

ID of the surface to attach to. Only required if you have more than one surface in your UI.

typeGenerator?: TypeGeneratorFunction<T>

Optional function to use to determine the type of object that a user has just started dragging

Version :