UNPKG

@progress/kendo-angular-gantt

Version:
68 lines (67 loc) 2.29 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { DragTargetDragEndEvent, DragTargetDragEvent } from "@progress/kendo-angular-utils"; import { TaskEditItem } from "./task-edit-event.interface"; /** * The event data of the Gantt `TaskDragEvent`. The event is triggered when the end user resizes or moves a Task. */ export interface TaskDragEvent { /** * The calculated new start date of the task. */ start: Date; /** * The calculated new end date of the task. */ end: Date; /** * The calculated new completion ratio. */ completionRatio: number; /** * The drag event, triggered from the end user dragging action. */ dragEvent: DragTargetDragEvent | DragTargetDragEndEvent; /** * The item object, associated with the dragged event. Contains the original data item, and its parent, allowing to access * and update all affected ancestor tasks in the data hierarchy as necessary. */ item: TaskEditItem; } /** * @hidden * The internal task drag event required for all necessary calculations and DOM updates */ export interface InternalTaskDragEvent { /** * The calculated new start date of the task. */ start: Date; /** * The calculated new end date of the task. */ end: Date; /** * The calculated new completion ratio. */ completionRatio: number; /** * The offset of the task DOM element, relative to the view start. */ offset: number; /** * The new width of the task DOM element in pixels. */ width: number; /** * The drag event, triggered from the end user dragging action. */ dragEvent: DragTargetDragEvent | DragTargetDragEndEvent; /** * The item object, associated with the dragged event. Contains the original data item, and its parent, allowing to access * and update all affected ancestor tasks in the data hierarchy as necessary. */ item: any; }