Moves event positioning to renderer

Relocates event CSS positioning logic from the `SwpEventElement` to the `DateEventRenderer`. This improves separation of concerns, making the renderer responsible for event layout.
This commit is contained in:
Janus C. H. Knudsen 2025-10-05 21:53:25 +02:00
parent 5fae433afb
commit 57bf122675
2 changed files with 11 additions and 12 deletions

View file

@ -85,7 +85,6 @@ export class SwpEventElement extends BaseSwpEventElement {
if (!this.hasChildNodes()) {
this.render();
}
this.applyPositioning();
}
/**
@ -193,16 +192,6 @@ export class SwpEventElement extends BaseSwpEventElement {
}
}
/**
* Apply initial positioning based on start/end times
*/
private applyPositioning(): void {
const position = PositionUtils.calculateEventPosition(this.start, this.end);
this.style.top = `${position.top + 1}px`;
this.style.height = `${position.height - 3}px`;
this.style.left = '2px';
this.style.right = '2px';
}
/**
* Calculate start/end minutes from Y position