This commit is contained in:
Janus Knudsen 2025-07-29 23:17:52 +02:00
parent 2e50679602
commit a410088fa7
2 changed files with 17 additions and 9 deletions

View file

@ -331,22 +331,31 @@ export class ScrollManager {
// Calculate available height for scrollable content
const availableHeight = containerRect.height - headerHeight;
// Calculate available width (container width minus time-axis and scrollbar)
const availableWidth = containerRect.width - 60 - 20; // 60px time-axis, 20px scrollbar
console.log('ScrollManager: Dynamic height calculation');
console.log('- Container height:', containerRect.height);
console.log('- Navigation height:', navHeight);
console.log('- Header height:', headerHeight);
console.log('- Available height:', availableHeight);
console.log('- Available width:', availableWidth);
// Set the height on scrollable content
// Set the height and width on scrollable content
if (availableHeight > 0) {
this.scrollableContent.style.height = `${availableHeight}px`;
// Recalculate scroll bounds after height change
setTimeout(() => {
this.calculateScrollBounds();
this.updateHandlePosition();
}, 0);
}
if (availableWidth > 0) {
this.scrollableContent.style.width = `${availableWidth}px`;
}
// Recalculate scroll bounds after dimension changes
setTimeout(() => {
this.calculateScrollBounds();
this.calculateHorizontalScrollBounds();
this.updateHandlePosition();
this.updateHorizontalHandlePosition();
}, 0);
}
/**