Adds event counting in columns

Implements a method to count the number of events
within a specific column, used for layout calculations.
This commit is contained in:
Janus C. H. Knudsen 2025-09-30 23:00:34 +02:00
parent c7b9abde9a
commit 67dfb6e894

View file

@ -523,6 +523,22 @@ export class AllDayManager {
this.checkAndAnimateAllDayHeight();
}
/**
* Count number of events in a specific column using ColumnBounds
*/
private countEventsInColumn(columnBounds: ColumnBounds): number {
var columnIndex = columnBounds.index;
var count = 0;
this.currentLayouts.forEach((layout) => {
// Check if event spans this column
if (layout.startColumn <= columnIndex && layout.endColumn >= columnIndex) {
count++;
}
});
return count;
}
/**
* Update overflow indicators for collapsed state
*/