@progress/kendo-angular-gantt
Version:
Kendo UI Angular Gantt
66 lines (65 loc) • 2.19 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* 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";
/**
* Contains the event data for the Gantt `TaskDragEvent`. This event triggers when the user resizes or moves a task.
*/
export interface TaskDragEvent {
/**
* Holds the new start date for the task.
*/
start: Date;
/**
* Holds the new end date for the task.
*/
end: Date;
/**
* Holds the new completion ratio.
*/
completionRatio: number;
/**
* Holds the drag event triggered by the user's action.
*/
dragEvent: DragTargetDragEvent | DragTargetDragEndEvent;
/**
* Holds the item object for the dragged event. Contains the original data item and its parent. Use this to update all affected ancestor tasks in the data hierarchy.
*/
item: TaskEditItem;
}
/**
* @hidden
* The internal task drag event required for all necessary calculations and DOM updates
*/
export interface InternalTaskDragEvent {
/**
* Holds the new start date for the task.
*/
start: Date;
/**
* Holds the new end date for the task.
*/
end: Date;
/**
* Holds the new completion ratio.
*/
completionRatio: number;
/**
* Holds the offset of the task DOM element, relative to the view start.
*/
offset: number;
/**
* Holds the new width of the task DOM element in pixels.
*/
width: number;
/**
* Holds the drag event triggered by the user's action.
*/
dragEvent: DragTargetDragEvent | DragTargetDragEndEvent;
/**
* Holds the item object for the dragged event. Contains the original data item and its parent. Use this to update all affected ancestor tasks in the data hierarchy.
*/
item: any;
}