UNPKG

@progress/kendo-angular-treeview

Version:
56 lines (55 loc) 1.93 kB
/**----------------------------------------------------------------------------------------- * 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 %}#toc-nodedrop) event. */ export class TreeItemDropEvent extends PreventableEvent { /** * A reference of the TreeView from which the dragged item originates. */ sourceTree; /** * A reference of the TreeView onto which the dragged item is dropped. */ destinationTree; /** * The look-up info for the dragged item. */ sourceItem; /** * The look-up info for the item onto which the dragged item is dropped. */ destinationItem; /** * Describes where the dragged item is dropped relative to the drop target item. */ dropPosition; /** * The original pointer event holding details about the current pointer position. */ originalEvent; /** * @hidden */ isValid = true; /** * @hidden */ constructor(initializer, originalEvent) { super(); Object.assign(this, initializer); this.originalEvent = originalEvent; } /** * Specifies if the drop action should be marked as valid. * If set to `false`, the [`addItem`]({% slug api_treeview_treeviewcomponent %}#toc-additem) and * [`removeItem`]({% slug api_treeview_treeviewcomponent %}#toc-removeitem) events will not be fired and the drag clue * will be animated back to the source item to indicate the action is marked as invalid. */ setValid(isValid) { this.isValid = isValid; } }