Removes unnecessary destroy methods
This commit is contained in:
parent
4e5077364e
commit
a1e1c5d185
19 changed files with 34 additions and 214 deletions
|
|
@ -130,7 +130,7 @@ export class AllDayManager {
|
|||
let startDate = new Date(headerReadyEventPayload.headerElements.at(0)!.date);
|
||||
let endDate = new Date(headerReadyEventPayload.headerElements.at(-1)!.date);
|
||||
|
||||
var events: CalendarEvent[] = this.eventManager.getEventsForPeriod(startDate, endDate);
|
||||
let events: CalendarEvent[] = this.eventManager.getEventsForPeriod(startDate, endDate);
|
||||
// Filter for all-day events
|
||||
const allDayEvents = events.filter(event => event.allDay);
|
||||
|
||||
|
|
@ -447,7 +447,7 @@ export class AllDayManager {
|
|||
let changedCount = 0;
|
||||
this.newLayouts.forEach((layout) => {
|
||||
// Find current layout for this event
|
||||
var currentLayout = this.currentLayouts.find(old => old.calenderEvent.id === layout.calenderEvent.id);
|
||||
let currentLayout = this.currentLayouts.find(old => old.calenderEvent.id === layout.calenderEvent.id);
|
||||
|
||||
if (currentLayout?.gridArea !== layout.gridArea) {
|
||||
changedCount++;
|
||||
|
|
@ -524,8 +524,8 @@ export class AllDayManager {
|
|||
* Count number of events in a specific column using ColumnBounds
|
||||
*/
|
||||
private countEventsInColumn(columnBounds: ColumnBounds): number {
|
||||
var columnIndex = columnBounds.index;
|
||||
var count = 0;
|
||||
let columnIndex = columnBounds.index;
|
||||
let count = 0;
|
||||
|
||||
this.currentLayouts.forEach((layout) => {
|
||||
// Check if event spans this column
|
||||
|
|
@ -544,15 +544,15 @@ export class AllDayManager {
|
|||
if (!container) return;
|
||||
|
||||
// Create overflow indicators for each column that needs them
|
||||
var columns = ColumnDetectionUtils.getColumns();
|
||||
let columns = ColumnDetectionUtils.getColumns();
|
||||
|
||||
columns.forEach((columnBounds) => {
|
||||
var totalEventsInColumn = this.countEventsInColumn(columnBounds);
|
||||
var overflowCount = Math.max(0, totalEventsInColumn - 3);
|
||||
let totalEventsInColumn = this.countEventsInColumn(columnBounds);
|
||||
let overflowCount = Math.max(0, totalEventsInColumn - 3);
|
||||
|
||||
if (overflowCount > 0) {
|
||||
// Create new overflow indicator element
|
||||
var overflowElement = document.createElement('swp-event');
|
||||
let overflowElement = document.createElement('swp-event');
|
||||
overflowElement.className = 'max-event-overflow';
|
||||
overflowElement.style.gridRow = '4';
|
||||
overflowElement.style.gridColumn = columnBounds.index.toString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue