New to Kendo UI for Vue? Start a free 30-day trial

TreeViewDragAnalyzer

A class which provides an API for analyzing the drag events of the TreeView.

Example
View Source
Change Theme:

destinationMeta { itemHierarchicalIndex: string; treeViewGuid: string; }

Returns an object which contains:

  • The itemHierarchicalIndex of the destination item (the item below the dragged item) and
  • The guid of the destination TreeView (the TreeView which renders the destination item).

isDropAllowed boolean

Returns true if dropping is allowed. Otherwise, returns false.

NameTypeDefaultDescription

destinationMeta

{ itemHierarchicalIndex: string; treeViewGuid: string; }

Returns an object which contains:

  • The itemHierarchicalIndex of the destination item (the item below the dragged item) and
  • The guid of the destination TreeView (the TreeView which renders the destination item).

isDropAllowed

boolean

Returns true if dropping is allowed. Otherwise, returns false.

Constructors

TreeViewDragAnalyzer

(event: TreeViewItemDragOverEvent | TreeViewItemDragEndEvent)

Parameters

event

TreeViewItemDragOverEvent | TreeViewItemDragEndEvent

The event that will be analyzed.

Methods

getDropOperation

Returns the specific drop operation.

Returns

undefined | "after" | "before" | "child"

  • The following values are returned:
  • before—Indicates that the dragged item is positioned at the beginning of the destination item.
  • after—Indicates that the dragged item is positioned at the end of the destination item.
  • child—Indicates that the dragged item is positioned in the middle of the destination item.
  • undefined—Indicates that dropping is not allowed.

init

The method which initializes the analyzer. Invoke the method before you call any other methods.

Returns

TreeViewDragAnalyzer

  • The analyzer object of the drag event.