Improves all-day event drag and drop

Refactors all-day event drag and drop handling for improved accuracy and performance.

Introduces a shared `ColumnDetectionUtils` for consistent column detection.

Simplifies all-day conversion during drag, placing events in row 1 and calculating the column from the target date.

Implements differential updates during drag end, updating only changed events for smoother transitions.
This commit is contained in:
Janus C. H. Knudsen 2025-09-26 22:11:57 +02:00
parent 41d078e2e8
commit 0553089085
6 changed files with 307 additions and 185 deletions

View file

@ -125,24 +125,21 @@ swp-resize-handle[data-position="bottom"] {
}
/* Resize handles controlled by JavaScript - no general hover */
/* Hit area */
swp-handle-hitarea {
position: absolute;
left: -8px;
right: -8px;
top: -6px;
bottom: -6px;
cursor: ns-resize;
}
&[data-position="top"] {
top: 4px;
}
&[data-position="bottom"] {
bottom: 4px;
}
swp-handle-hitarea {
position: absolute;
left: -8px;
right: -8px;
top: -6px;
bottom: -6px;
cursor: ns-resize;
}
swp-handle-hitarea[data-position="top"] {
top: 4px;
}
swp-handle-hitarea[data-position="bottom"] {
bottom: 4px;
}
/* Multi-day events */
@ -250,3 +247,8 @@ swp-event-group swp-event {
right: 0;
margin: 0;
}
/* All-day event transition for smooth repositioning */
swp-allday-container swp-event.transitioning {
transition: grid-area 200ms ease-out, grid-row 200ms ease-out, grid-column 200ms ease-out;
}