Improves drag and resize behavior

Prevents drag initiation when clicking on the resize handle of an event.
Reduces event height to prevent overlap with time gridlines.
This commit is contained in:
Janus C. H. Knudsen 2025-10-08 19:35:29 +02:00
parent 7a62ef7040
commit ce0a9b19eb
2 changed files with 12 additions and 12 deletions

View file

@ -208,7 +208,7 @@ export class ResizeHandleManager {
const snapDistancePx = (this.snapIntervalMinutes / 60) * this.hourHeightPx;
const currentHeight = this.resizingElement.offsetHeight;
const snappedHeight = Math.round(currentHeight / snapDistancePx) * snapDistancePx;
const finalHeight = Math.max(30, snappedHeight);
const finalHeight = Math.max(30, snappedHeight) - 3; //a little gap, so it doesn't cover the horizontal time lines
const swpEvent = this.resizingElement as any;
if (swpEvent.updateHeight) {