Optimize all-day event management and removal

Improves event removal process with enhanced fade-out and logging
Adds data-removing attribute to exclude events during height calculations
Prevents unnecessary removal of all-day events during drag operations

Enhances event rendering and management for better performance and user experience
This commit is contained in:
Janus C. H. Knudsen 2025-11-11 20:03:42 +01:00
parent 2656bae054
commit 818ed50176
2 changed files with 19 additions and 14 deletions

View file

@ -172,8 +172,11 @@ export class DateEventRenderer implements IEventRenderer {
return;
}
// Fade out original
this.fadeOutAndRemove(originalElement);
// Only fade out and remove if it's a swp-event (not swp-allday-event)
// AllDayManager handles removal of swp-allday-event elements
if (originalElement.tagName === 'SWP-EVENT') {
this.fadeOutAndRemove(originalElement);
}
// Remove clone prefix and normalize clone to be a regular event
const cloneId = draggedClone.dataset.eventId;