Improves drag and drop event handling

Refactors drag and drop logic for better event handling and code clarity.

- Moves drag styling to CSS class for cleaner code.
- Emits a 'drag:convert-from-allday' event to handle the conversion of all-day events back to day events.
- Adds logging for debugging purposes.
This commit is contained in:
Janus Knudsen 2025-09-16 23:09:10 +02:00
parent 7e45293128
commit b95a516806
3 changed files with 42 additions and 29 deletions

View file

@ -51,6 +51,18 @@ swp-day-columns swp-event {
color: var(--color-text);
}
/* Dragging state */
&.dragging {
position: absolute;
z-index: 999999;
pointer-events: none;
opacity: 0.8;
left: 2px;
right: 2px;
margin-left: 0px;
width: auto;
}
}
swp-day-columns swp-event:hover {