Improves drag and drop all-day event handling
Refines drag and drop behavior for all-day events. Removes unnecessary logging and conditional logic in the AllDayManager. Simplifies column change handling in the EventRendererManager.
This commit is contained in:
parent
5cdcd12e0a
commit
88702e574a
2 changed files with 2 additions and 9 deletions
|
|
@ -97,16 +97,10 @@ export class AllDayManager {
|
||||||
if (draggedClone == null)
|
if (draggedClone == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Filter: Only handle events where clone IS an all-day event
|
|
||||||
if (!draggedClone.hasAttribute('data-allday')) {
|
if (!draggedClone.hasAttribute('data-allday')) {
|
||||||
return; // This is not an all-day event, let EventRendererManager handle it
|
return; // This is not an all-day event
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('🔄 AllDayManager: Handling drag:column-change for all-day event', {
|
|
||||||
eventId: draggedElement.dataset.eventId,
|
|
||||||
cloneId: draggedClone.dataset.eventId
|
|
||||||
});
|
|
||||||
|
|
||||||
this.handleColumnChange(draggedClone, mousePosition);
|
this.handleColumnChange(draggedClone, mousePosition);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -404,7 +398,7 @@ export class AllDayManager {
|
||||||
// Update clone position - ALWAYS keep in row 1 during drag
|
// Update clone position - ALWAYS keep in row 1 during drag
|
||||||
// Use simple grid positioning that matches all-day container structure
|
// Use simple grid positioning that matches all-day container structure
|
||||||
dragClone.style.gridColumn = targetColumn.index.toString();
|
dragClone.style.gridColumn = targetColumn.index.toString();
|
||||||
dragClone.style.gridRow = '1'; // Force row 1 during drag
|
//dragClone.style.gridRow = '1'; // Force row 1 during drag
|
||||||
dragClone.style.gridArea = `1 / ${targetColumn.index} / 2 / ${targetColumn.index + 1}`;
|
dragClone.style.gridArea = `1 / ${targetColumn.index} / 2 / ${targetColumn.index + 1}`;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,6 @@ export class EventRenderingService {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.strategy.handleColumnChange) {
|
if (this.strategy.handleColumnChange) {
|
||||||
const eventId = columnChangeEvent.originalElement.dataset.eventId || '';
|
|
||||||
this.strategy.handleColumnChange(columnChangeEvent);
|
this.strategy.handleColumnChange(columnChangeEvent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue