DragOptions
Options for element drag
Type Parameters
E
E
Properties
autoPan?
optionalautoPan:boolean
Defaults to true, meaning the canvas will pan automatically to track elements that have been dragged out of the visible area.
autoPanBoundsStrategy?
optionalautoPanBoundsStrategy:AutoPanBoundsStrategy
When auto-panning, this flag instructs the auto pan how to determine if an element is inside the root bounds or not. A value of "contained" (the default), means the whole element has to be inside the root bounds. A value of "intersecting" means that the element needs to just intersect the root bounds by some amount.
autoPanDelta?
optionalautoPanDelta:number
When auto-panning, this is the number of pixels that the canvas repositions itself on each tick. Defaults to 5.
autoPanRepeat?
optionalautoPanRepeat:number
When auto-panning, this is the speed (in milliseconds) at which the canvas repositions itself. Defaults to 15ms.
canDrop()?
optionalcanDrop: (candidate,target?,onCanvas?) =>boolean
Optional function that is invoked at the start of a drag, and which identifies allowed drop targets. Each target - the canvas, nodes and groups - is passed in turn to this method; returning false indicates that the given target is not valid for that drag.
Parameters
candidate
target?
onCanvas?
boolean
Returns
boolean
constrainFunction?
optionalconstrainFunction:DragConstrainFunction<E>
Optional function to use to constrain element dragging.
Param
Param
Param
Param
cssFilter?
optionalcssFilter:string
Optional CSS3 selector identifying parts of nodes/groups that should not cause a drag to start.
filter?
optionalfilter:VertexDragFilter<E>
Optional function to invoke prior to a drag starting.