Adds date-based column retrieval
Adds a method to retrieve column bounds based on a given date, enhancing date-specific event placement. Removes unnecessary data storage for overflow event titles, simplifying overflow event handling.
This commit is contained in:
parent
67dfb6e894
commit
6a17bba343
2 changed files with 18 additions and 8 deletions
|
|
@ -67,6 +67,22 @@ export class ColumnDetectionUtils {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get column bounds by Date
|
||||
*/
|
||||
public static getColumnBoundsByDate(date: Date): ColumnBounds | null {
|
||||
if (this.columnBoundsCache.length === 0) {
|
||||
this.updateColumnBoundsCache();
|
||||
}
|
||||
|
||||
// Convert Date to YYYY-MM-DD format
|
||||
var dateString = date.toISOString().split('T')[0];
|
||||
|
||||
// Find column that matches the date
|
||||
var column = this.columnBoundsCache.find(col => col.date === dateString);
|
||||
return column || null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear cache (useful for testing or when DOM structure changes)
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue