31 lines
965 B
TypeScript
31 lines
965 B
TypeScript
|
|
/**
|
||
|
|
* ColumnDetectionUtils - Shared utility for column detection and caching
|
||
|
|
* Used by both DragDropManager and AllDayManager for consistent column detection
|
||
|
|
*/
|
||
|
|
import { IMousePosition } from "../types/DragDropTypes";
|
||
|
|
export interface IColumnBounds {
|
||
|
|
date: string;
|
||
|
|
left: number;
|
||
|
|
right: number;
|
||
|
|
boundingClientRect: DOMRect;
|
||
|
|
element: HTMLElement;
|
||
|
|
index: number;
|
||
|
|
}
|
||
|
|
export declare class ColumnDetectionUtils {
|
||
|
|
private static columnBoundsCache;
|
||
|
|
/**
|
||
|
|
* Update column bounds cache for coordinate-based column detection
|
||
|
|
*/
|
||
|
|
static updateColumnBoundsCache(): void;
|
||
|
|
/**
|
||
|
|
* Get column date from X coordinate using cached bounds
|
||
|
|
*/
|
||
|
|
static getColumnBounds(position: IMousePosition): IColumnBounds | null;
|
||
|
|
/**
|
||
|
|
* Get column bounds by Date
|
||
|
|
*/
|
||
|
|
static getColumnBoundsByDate(date: Date): IColumnBounds | null;
|
||
|
|
static getColumns(): IColumnBounds[];
|
||
|
|
static getHeaderColumns(): IColumnBounds[];
|
||
|
|
}
|