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
|
|
@ -185,12 +185,9 @@ export class DragDropManager {
|
|||
// Detect current column
|
||||
this.currentColumnBounds = ColumnDetectionUtils.getColumnBounds(currentPosition);
|
||||
|
||||
// Create SwpEventElement from existing DOM element and clone it
|
||||
const originalSwpEvent = SwpEventElement.fromExistingElement(this.draggedElement);
|
||||
const clonedSwpEvent = originalSwpEvent.createClone();
|
||||
|
||||
// Get the cloned DOM element
|
||||
this.draggedClone = clonedSwpEvent.getElement();
|
||||
// Cast to SwpEventElement and create clone
|
||||
const originalSwpEvent = this.draggedElement as SwpEventElement;
|
||||
this.draggedClone = originalSwpEvent.createClone();
|
||||
|
||||
const dragStartPayload: DragStartEventPayload = {
|
||||
draggedElement: this.draggedElement,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue