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 679580702b - Show all commits

View file

@ -1,6 +1,7 @@
import { IEventBus } from '../../types/CalendarTypes';
import { IGridConfig } from '../../core/IGridConfig';
import { CoreEvents } from '../../constants/CoreEvents';
import { HeaderDrawerManager } from '../../core/HeaderDrawerManager';
import {
IDragEnterHeaderPayload,
IDragMoveHeaderPayload,
@ -20,10 +21,12 @@ export class HeaderDrawerRenderer {
private currentItem: HTMLElement | null = null;
private container: HTMLElement | null = null;
private sourceElement: HTMLElement | null = null;
private wasExpandedBeforeDrag = false;
constructor(
private eventBus: IEventBus,
private gridConfig: IGridConfig
private gridConfig: IGridConfig,
private headerDrawerManager: HeaderDrawerManager
) {
this.setupListeners();
}
@ -63,6 +66,12 @@ export class HeaderDrawerRenderer {
this.container = document.querySelector('swp-header-drawer');
if (!this.container) return;
// Remember if drawer was already expanded
this.wasExpandedBeforeDrag = this.headerDrawerManager.isExpanded();
// Expand drawer with animation
this.headerDrawerManager.expand();
// Store reference to source element
this.sourceElement = payload.element;
@ -147,5 +156,10 @@ export class HeaderDrawerRenderer {
this.sourceElement.style.visibility = '';
this.sourceElement = null;
}
// Collapse drawer if it wasn't expanded before drag
if (!this.wasExpandedBeforeDrag) {
this.headerDrawerManager.collapse();
}
}
}