This commit is contained in:
Janus C. H. Knudsen 2025-10-13 18:03:08 +02:00
parent d259620371
commit dbbd19de13

View file

@ -182,8 +182,9 @@ export class DragDropManager {
* Optimized mouse move handler with consolidated position calculations * Optimized mouse move handler with consolidated position calculations
*/ */
private handleMouseMove(event: MouseEvent): void { private handleMouseMove(event: MouseEvent): void {
console.log('handleMouseMove', event)
if (this.isScrollCompensating) return; if (this.isScrollCompensating) return;
//this.currentMouseY = event.clientY; //this.currentMouseY = event.clientY;
// this.lastMousePosition = { x: event.clientX, y: event.clientY }; // this.lastMousePosition = { x: event.clientX, y: event.clientY };
@ -459,9 +460,12 @@ export class DragDropManager {
// First time scrolling - save initial positions NOW! // First time scrolling - save initial positions NOW!
if(this.initialScrollTop == 0)
this.initialScrollTop = this.scrollableContent.scrollTop; this.initialScrollTop = this.scrollableContent.scrollTop;
if(this.initialCloneTop == 0)
this.initialCloneTop = parseFloat(this.draggedClone.style.top || '0'); this.initialCloneTop = parseFloat(this.draggedClone.style.top || '0');
console.log('💾 DragDropManager: Scroll compensation started', { console.log('💾 DragDropManager: Scroll compensation started', {
initialScrollTop: this.initialScrollTop, initialScrollTop: this.initialScrollTop,
initialCloneTop: this.initialCloneTop initialCloneTop: this.initialCloneTop