WIP
This commit is contained in:
parent
5c67825e19
commit
18e80bbce2
1 changed files with 4 additions and 4 deletions
|
|
@ -47,9 +47,6 @@ export class HeaderManager {
|
||||||
const calendarHeader = this.getCalendarHeader();
|
const calendarHeader = this.getCalendarHeader();
|
||||||
if (!calendarHeader) return;
|
if (!calendarHeader) return;
|
||||||
|
|
||||||
// Clean up existing listeners first
|
|
||||||
this.removeEventListeners();
|
|
||||||
|
|
||||||
// Throttle for better performance
|
// Throttle for better performance
|
||||||
let lastEmitTime = 0;
|
let lastEmitTime = 0;
|
||||||
const throttleDelay = 16; // ~60fps
|
const throttleDelay = 16; // ~60fps
|
||||||
|
|
@ -142,6 +139,9 @@ export class HeaderManager {
|
||||||
const calendarHeader = this.getOrCreateCalendarHeader();
|
const calendarHeader = this.getOrCreateCalendarHeader();
|
||||||
if (!calendarHeader) return;
|
if (!calendarHeader) return;
|
||||||
|
|
||||||
|
// Remove existing event listeners BEFORE clearing content
|
||||||
|
this.removeEventListeners();
|
||||||
|
|
||||||
// Clear existing content
|
// Clear existing content
|
||||||
calendarHeader.innerHTML = '';
|
calendarHeader.innerHTML = '';
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@ export class HeaderManager {
|
||||||
|
|
||||||
headerRenderer.render(calendarHeader, context);
|
headerRenderer.render(calendarHeader, context);
|
||||||
|
|
||||||
// Re-setup event listeners
|
// Setup event listeners on the new content
|
||||||
this.setupHeaderDragListeners();
|
this.setupHeaderDragListeners();
|
||||||
|
|
||||||
// Notify other managers that header was rebuilt
|
// Notify other managers that header was rebuilt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue