wwip
This commit is contained in:
parent
a9d6d14c93
commit
420036d939
4 changed files with 17 additions and 11 deletions
|
|
@ -6,6 +6,7 @@ import { AllDayEventRenderer } from '../renderers/AllDayEventRenderer';
|
|||
import { AllDayLayoutEngine, EventLayout } from '../utils/AllDayLayoutEngine';
|
||||
import { ColumnBounds, ColumnDetectionUtils } from '../utils/ColumnDetectionUtils';
|
||||
import { CalendarEvent } from '../types/CalendarTypes';
|
||||
import { SwpAllDayEventElement } from '../elements/SwpEventElement';
|
||||
import {
|
||||
DragMouseEnterHeaderEventPayload,
|
||||
DragStartEventPayload,
|
||||
|
|
@ -312,20 +313,19 @@ export class AllDayManager {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle conversion of timed event to all-day event - SIMPLIFIED
|
||||
* During drag: Place in row 1 only, calculate column from targetDate
|
||||
*/
|
||||
private handleConvertToAllDay(payload: DragMouseEnterHeaderEventPayload): void {
|
||||
|
||||
let allDayContainer = this.getAllDayContainer();
|
||||
if (!allDayContainer) return;
|
||||
|
||||
payload.draggedClone.removeAttribute('style');
|
||||
payload.draggedClone.style.gridRow = '1';
|
||||
payload.draggedClone.style.gridColumn = payload.targetColumn.index.toString();
|
||||
payload.draggedClone.dataset.allday = 'true';
|
||||
const allDayElement = SwpAllDayEventElement.fromCalendarEvent(payload.calendarEvent);
|
||||
|
||||
allDayContainer?.appendChild(payload.draggedClone);
|
||||
// Apply grid positioning
|
||||
allDayElement.style.gridRow = '1';
|
||||
allDayElement.style.gridColumn = payload.targetColumn.index.toString();
|
||||
|
||||
payload.draggedClone.remove();
|
||||
allDayContainer.appendChild(allDayElement);
|
||||
|
||||
ColumnDetectionUtils.updateColumnBoundsCache();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue