Type alias DndOptionsType

DndOptionsType: {
    autoExpandMS?: 1500;
    drag?: null | ((e) => void);
    dragEnd?: null | ((e) => void);
    dragEnter?: null | ((e) => DropRegionType | DropRegionTypeSet | boolean);
    dragExpand?: null | ((e) => boolean);
    dragLeave?: null | ((e) => void);
    dragOver?: null | ((e) => void);
    dragStart?: null | ((e) => boolean);
    drop?: null | ((e) => void);
    dropEffectDefault?: DropEffectType;
    effectAllowed?: DropEffectAllowedType;
    guessDropEffect: boolean;
    multiSource?: false;
    preventForeignNodes?: boolean;
    preventLazyParents?: boolean;
    preventNonNodes?: boolean;
    preventRecursion?: boolean;
    preventSameParent?: boolean;
    preventVoidMoves?: boolean;
    scroll?: boolean;
    scrollSensitivity?: 20;
    scrollSpeed?: 5;
    serializeClipboardData?: boolean | ((nodeData, node) => string);
    sourceCopyHook?: null;
}

Type declaration

  • Optional autoExpandMS?: 1500

    Expand nodes after n milliseconds of hovering

    Default

    1500
    
  • Optional drag?: null | ((e) => void)

    Callback(sourceNode, data)

    Default

    null
    
  • Optional dragEnd?: null | ((e) => void)

    Callback(sourceNode, data)

    Default

    null
    
  • Optional dragEnter?: null | ((e) => DropRegionType | DropRegionTypeSet | boolean)

    Callback(targetNode, data), return true, to enable dnd drop

    Default

    null
    
  • Optional dragExpand?: null | ((e) => boolean)

    Callback(targetNode, data), return false to prevent autoExpand

    Default

    null
    
  • Optional dragLeave?: null | ((e) => void)

    Callback(targetNode, data)

    Default

    null
    
  • Optional dragOver?: null | ((e) => void)

    Callback(targetNode, data)

    Default

    null
    
  • Optional dragStart?: null | ((e) => boolean)

    Callback(sourceNode, data), return true, to enable dnd drag

    Default

    null
    
  • Optional drop?: null | ((e) => void)

    Callback(targetNode, data)

    Default

    null
    
  • Optional dropEffectDefault?: DropEffectType

    Default dropEffect ('copy', 'link', or 'move') when no modifier is pressed. Overidable in the dragEnter or dragOver event.

    Default

    "move"
    
  • Optional effectAllowed?: DropEffectAllowedType

    Restrict the possible cursor shapes and modifier operations (can also be set in the dragStart event)

    Default

    "all"
    
  • guessDropEffect: boolean

    Use opinionated heuristics to determine the dropEffect ('copy', 'link', or 'move') based on effectAllowed, dropEffectDefault, and modifier keys. This is recalculated before each dragEnter and dragOver event and can be overridden there.

    Default

    true
    
  • Optional multiSource?: false

    true: Drag multiple (i.e. selected) nodes. Also a callback() is allowed

    Default

    false
    
  • Optional preventForeignNodes?: boolean

    Prevent dropping nodes from different Wunderbaum trees

    Default

    false
    
  • Optional preventLazyParents?: boolean

    Prevent dropping items on unloaded lazy Wunderbaum tree nodes

    Default

    true
    
  • Optional preventNonNodes?: boolean

    Prevent dropping items other than Wunderbaum tree nodes

    Default

    false
    
  • Optional preventRecursion?: boolean

    Prevent dropping nodes on own descendants

    Default

    true
    
  • Optional preventSameParent?: boolean

    Prevent dropping nodes under same direct parent

    Default

    false
    
  • Optional preventVoidMoves?: boolean

    Prevent dropping nodes 'before self', etc. (move only)

    Default

    true
    
  • Optional scroll?: boolean

    Enable auto-scrolling while dragging

    Default

    true
    
  • Optional scrollSensitivity?: 20

    Active top/bottom margin in pixel

    Default

    20
    
  • Optional scrollSpeed?: 5

    Pixel per event

    Default

    5
    
  • Optional serializeClipboardData?: boolean | ((nodeData, node) => string)

    Serialize Node Data to datatransfer object

    Default

    true
    
  • Optional sourceCopyHook?: null

    Optional callback passed to toDict on dragStart

    Default

    null