dropBehaviour

defines the behaviour of a dragged item

string dropBehaviour;

Example

var source = new dhx.Tree("tree-source",{dragMode:"source", dropBehaviour:"complex"});
var target = new dhx.Tree("tree-target",{dragMode:"target", dropBehaviour:"complex"});

Related samples

Details

Don't forget to enable drag-n-drop via the dragMode property to use dropBehaviour.

There are three modes of behaviour of a dragged tree item, depending on the value set for the dropBehaviour option in the configuration object of a tree:

  • "child" - a dragged item becomes a child of the item it is dragged to

Child

  • "sibling" - a dragged item becomes a sibling of the item it is dragged to

Sibling

  • "complex" - a dragged item can become both a child or a sibling of a target item, depending on the position specified by highlighting (check the above images)
See also
Back to top