Improves all-day event overflow handling
Ensures correct display of all-day events when collapsed or expanded. Improves the transition between collapsed and expanded states by adjusting the overflow event visibility.
This commit is contained in:
parent
0bf369907b
commit
496be2f7ce
2 changed files with 47 additions and 42 deletions
|
|
@ -462,7 +462,10 @@ export class AllDayManager {
|
|||
element.style.gridColumn = `${layout.startColumn} / ${layout.endColumn + 1}`;
|
||||
|
||||
if (layout.row > ALL_DAY_CONSTANTS.MAX_COLLAPSED_ROWS)
|
||||
if (!this.isExpanded)
|
||||
element.classList.add('max-event-overflow-hide');
|
||||
else
|
||||
element.classList.add('max-event-overflow-show');
|
||||
|
||||
// Remove transition class after animation
|
||||
setTimeout(() => element.classList.remove('transitioning'), 200);
|
||||
|
|
@ -556,7 +559,7 @@ export class AllDayManager {
|
|||
*/
|
||||
private updateOverflowIndicators(): void {
|
||||
const container = this.getAllDayContainer();
|
||||
if(!container) return;
|
||||
if (!container) return;
|
||||
|
||||
// Create overflow indicators for each column that needs them
|
||||
let columns = ColumnDetectionUtils.getColumns();
|
||||
|
|
@ -587,7 +590,7 @@ export class AllDayManager {
|
|||
*/
|
||||
private clearOverflowIndicators(): void {
|
||||
const container = this.getAllDayContainer();
|
||||
if(!container) return;
|
||||
if (!container) return;
|
||||
|
||||
// Remove all overflow indicator elements
|
||||
container.querySelectorAll('.max-event-indicator').forEach((element) => {
|
||||
|
|
|
|||
|
|
@ -379,11 +379,13 @@ swp-allday-container swp-event.max-event-indicator span {
|
|||
}
|
||||
|
||||
swp-allday-container swp-event.max-event-overflow-show {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
swp-allday-container swp-event.max-event-overflow-hide {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
/* Hide time element for all-day styled events */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue