Refactor resize and event rendering with performance improvements
Optimizes event resize and rendering logic by: - Simplifying resize handle management - Improving single column event rendering - Reducing unnecessary DOM operations - Removing redundant event caching and subscriptions Improves performance and reduces complexity in event interaction flow
This commit is contained in:
parent
133cf34906
commit
34cf4fbfca
5 changed files with 597 additions and 262 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { EventBus } from '../core/EventBus';
|
||||
import { IEventBus, ICalendarEvent, IRenderContext } from '../types/CalendarTypes';
|
||||
import { CoreEvents } from '../constants/CoreEvents';
|
||||
import { EventManager } from '../managers/EventManager';
|
||||
|
|
@ -262,19 +261,10 @@ export class EventRenderingService {
|
|||
newEnd
|
||||
});
|
||||
|
||||
// Find the column for this event
|
||||
const columnElement = element.closest('swp-day-column') as HTMLElement;
|
||||
if (columnElement) {
|
||||
const columnDate = columnElement.dataset.date;
|
||||
if (columnDate) {
|
||||
// Get column bounds and re-render the column to recalculate stacking/grouping
|
||||
const columnDateObj = this.dateService.parseISO(`${columnDate}T00:00:00`);
|
||||
const columnBounds = ColumnDetectionUtils.getColumnBoundsByDate(columnDateObj);
|
||||
if (columnBounds) {
|
||||
await this.renderSingleColumn(columnBounds);
|
||||
}
|
||||
}
|
||||
}
|
||||
let columnBounds = ColumnDetectionUtils.getColumnBoundsByDate(newStart);
|
||||
if (columnBounds)
|
||||
await this.renderSingleColumn(columnBounds);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue