hy-vue-gantt
Version:
Evolution of vue-ganttastic package
18 lines • 1.1 kB
TypeScript
import type { GanttBarObject, GGanttChartConfig } from "../types";
import type { MovementAPI } from "./useBarMovement";
/**
* Creates drag functionality for a Gantt chart bar
* Handles different types of drag behaviors including full bar dragging and edge resizing
* @param bar - The Gantt bar object to add drag functionality to
* @param onDrag - Callback function called during drag
* @param onEndDrag - Callback function called when drag ends
* @param config - Gantt chart configuration object
* @param movementAPI - API for handling bar movement constraints
* @param ganttId - ID of the Gantt chart instance
* @returns Object containing drag state and initialization method
*/
export default function createBarDrag(bar: GanttBarObject, onDrag: ((e: MouseEvent, bar: GanttBarObject) => void) | undefined, onEndDrag: ((e: MouseEvent, bar: GanttBarObject) => void) | undefined, config: GGanttChartConfig, movementAPI: MovementAPI, ganttId: string): {
isDragging: import("vue").Ref<boolean, boolean>;
initDrag: (e: MouseEvent) => void;
};
//# sourceMappingURL=createBarDrag.d.ts.map