Refactors event element handling with web components
Introduces web components for event elements, separating timed and all-day events into distinct components for better organization and reusability. This change also simplifies event rendering and drag-and-drop operations by leveraging the properties and lifecycle methods of web components.
This commit is contained in:
parent
1a47214831
commit
a9d6d14c93
6 changed files with 253 additions and 274 deletions
|
|
@ -76,10 +76,10 @@ export class AllDayEventRenderer {
|
|||
const container = this.getContainer();
|
||||
if (!container) return null;
|
||||
|
||||
let dayEvent = new SwpAllDayEventElement(event);
|
||||
dayEvent.applyGridPositioning(layout);
|
||||
const dayEvent = SwpAllDayEventElement.fromCalendarEvent(event);
|
||||
dayEvent.applyGridPositioning(layout.row, layout.startColumn, layout.endColumn);
|
||||
|
||||
container.appendChild(dayEvent.getElement());
|
||||
container.appendChild(dayEvent);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue