Moving away from Azure Devops #1

Merged
Janus007 merged 113 commits from refac into master 2026-02-03 00:04:27 +01:00
Showing only changes of commit 1a4c22d37f - Show all commits

View file

@ -175,7 +175,27 @@ export class DragDropManager {
const columnElement = element.closest('swp-day-column') as HTMLElement;
if (!columnElement) return;
const startY = parseFloat(element.style.top) || 0;
// Calculate absolute Y position using getBoundingClientRect
const elementRect = element.getBoundingClientRect();
const columnRect = columnElement.getBoundingClientRect();
const startY = elementRect.top - columnRect.top;
// If event is inside a group, move it to events-layer for correct positioning during drag
const group = element.closest('swp-event-group');
if (group) {
const eventsLayer = columnElement.querySelector('swp-events-layer');
if (eventsLayer) {
eventsLayer.appendChild(element);
}
}
// Set consistent positioning for drag (works for both grouped and stacked events)
element.style.position = 'absolute';
element.style.top = `${startY}px`;
element.style.left = '2px';
element.style.right = '2px';
element.style.marginLeft = '0'; // Reset stacking margin
// Create ghost clone
const ghostElement = element.cloneNode(true) as HTMLElement;
@ -190,7 +210,6 @@ export class DragDropManager {
element.classList.add('dragging');
// Calculate initial target from mouse position
const columnRect = columnElement.getBoundingClientRect();
const targetY = e.clientY - columnRect.top - mouseOffset.y;
// Initialize drag state