A step in the right direction for this time axis

This commit is contained in:
Janus Knudsen 2025-08-01 23:45:13 +02:00
parent b6d3d22ce9
commit 209ae0830d
4 changed files with 33 additions and 11 deletions

View file

@ -397,13 +397,16 @@ export class ScrollManager {
if (!this.scrollableContent || !this.timeAxis) return;
const scrollTop = this.scrollableContent.scrollTop;
const timeAxisContent = this.timeAxis.querySelector('swp-time-axis-content');
// Use transform for smooth performance
this.timeAxis.style.transform = `translateY(-${scrollTop}px)`;
// Debug logging (can be removed later)
if (scrollTop % 100 === 0) { // Only log every 100px to avoid spam
console.log(`ScrollManager: Synced time-axis to scrollTop: ${scrollTop}px`);
if (timeAxisContent) {
// Use transform for smooth performance
timeAxisContent.style.transform = `translateY(-${scrollTop}px)`;
// Debug logging (can be removed later)
if (scrollTop % 100 === 0) { // Only log every 100px to avoid spam
console.log(`ScrollManager: Synced time-axis to scrollTop: ${scrollTop}px`);
}
}
}