Options for element drag in a Surface.

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

Hierarchy

  • Omit<DragOptions, "grid">
    • SurfaceDragOptions

Properties

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.