@progress/kendo-angular-treeview
Version:
Kendo UI TreeView for Angular
55 lines (54 loc) • 1.74 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { PreventableEvent } from './preventable-event';
/**
* Arguments for the TreeView [`nodeDrop`](slug:api_treeview_treeviewcomponent#nodedrop) event.
*/
export class TreeItemDropEvent extends PreventableEvent {
/**
* Reference to the TreeView from which the dragged item originates.
*/
sourceTree;
/**
* Reference to the TreeView onto which the dragged item is dropped.
*/
destinationTree;
/**
* Lookup information for the dragged item.
*/
sourceItem;
/**
* Lookup information for the item onto which the dragged item is dropped.
*/
destinationItem;
/**
* Represents the drop position relative to the target item.
*/
dropPosition;
/**
* The original pointer event containing details about the pointer position.
*/
originalEvent;
/**
* @hidden
*/
isValid = true;
/**
* @hidden
*/
constructor(initializer, originalEvent) {
super();
Object.assign(this, initializer);
this.originalEvent = originalEvent;
}
/**
* Sets whether the drop action is valid.
* If set to `false`, the `addItem` and `removeItem` events will not be fired and the drag clue
* will animate back to the source item to indicate the action is invalid.
*/
setValid(isValid) {
this.isValid = isValid;
}
}