Optimize all-day event layout rendering
Improves event removal and layout recalculation process Enhances event removal by: - Filtering out removed event - Recalculating event layouts dynamically - Re-rendering events with compressed layout - Animating container height accordingly Reduces visual gaps and improves layout responsiveness
This commit is contained in:
parent
1011513b52
commit
7cda973f59
1 changed files with 10 additions and 0 deletions
|
|
@ -128,7 +128,17 @@ export class AllDayManager {
|
||||||
|
|
||||||
console.log('🔄 AllDayManager: All-day → timed conversion', { eventId });
|
console.log('🔄 AllDayManager: All-day → timed conversion', { eventId });
|
||||||
|
|
||||||
|
// Mark for removal (sets data-removing attribute)
|
||||||
this.fadeOutAndRemove(dragEndPayload.originalElement);
|
this.fadeOutAndRemove(dragEndPayload.originalElement);
|
||||||
|
|
||||||
|
// Recalculate layout WITHOUT the removed event to compress gaps
|
||||||
|
const remainingEvents = this.currentAllDayEvents.filter(e => e.id !== eventId);
|
||||||
|
const newLayouts = this.calculateAllDayEventsLayout(remainingEvents, this.currentWeekDates);
|
||||||
|
|
||||||
|
// Re-render all-day events with compressed layout
|
||||||
|
this.allDayEventRenderer.renderAllDayEventsForPeriod(newLayouts);
|
||||||
|
|
||||||
|
// NOW animate height with compressed layout
|
||||||
this.checkAndAnimateAllDayHeight();
|
this.checkAndAnimateAllDayHeight();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue