Implements edge scrolling functionality
Adds edge scrolling to automatically scroll the calendar when dragging an event near the edges of the view. This improves the drag-and-drop experience by allowing users to move events beyond the visible area. Removes auto-scroll logic from the event renderer, centralizing the scrolling behavior within the new edge scroll manager.
This commit is contained in:
parent
40b19a092c
commit
8df1f6c4f1
5 changed files with 139 additions and 25 deletions
|
|
@ -126,7 +126,6 @@ export class EventRenderingService {
|
|||
private setupDragEventListeners(): void {
|
||||
this.setupDragStartListener();
|
||||
this.setupDragMoveListener();
|
||||
this.setupDragAutoScrollListener();
|
||||
this.setupDragEndListener();
|
||||
this.setupDragColumnChangeListener();
|
||||
this.setupDragMouseLeaveHeaderListener();
|
||||
|
|
@ -162,16 +161,6 @@ export class EventRenderingService {
|
|||
});
|
||||
}
|
||||
|
||||
private setupDragAutoScrollListener(): void {
|
||||
this.eventBus.on('drag:auto-scroll', (event: Event) => {
|
||||
const { draggedElement, snappedY } = (event as CustomEvent).detail;
|
||||
if (this.strategy.handleDragAutoScroll) {
|
||||
const eventId = draggedElement.dataset.eventId || '';
|
||||
this.strategy.handleDragAutoScroll(eventId, snappedY);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private setupDragEndListener(): void {
|
||||
this.eventBus.on('drag:end', (event: Event) => {
|
||||
const { originalElement: draggedElement, sourceColumn, finalPosition, target } = (event as CustomEvent<DragEndEventPayload>).detail;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue