Options for element drag in a Surface.

interface SurfaceDragOptions {
    addHelperClasses?: boolean;
    constrainFunction?: ((desiredLoc, dragEl, constrainRect, size, currentLoc) => PointXY);
    filter?: string;


  • Omit<DragOptions, "grid">
    • SurfaceDragOptions


addHelperClasses?: boolean

Defaults to true, meaning that when element dragging is occurring a class is added to the document body and also to the surface container.

constrainFunction?: ((desiredLoc, dragEl, constrainRect, size, currentLoc) => PointXY)

Optional function to use to constrain element dragging.

Type declaration

filter?: string

Optional CSS3 selector identifying parts of nodes/groups that should not cause a drag to start.