Skip to content

Commit

Permalink
Changed to 'auto' to disable smooth scrolling for better user experience
Browse files Browse the repository at this point in the history
  • Loading branch information
TyroneAEM committed Aug 15, 2024
1 parent 3276ba4 commit 4471320
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/program-calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,11 +630,12 @@ function scrollToPosition(element, scrollPct) {
const maxScrollLeft = element.scrollWidth;
const scrollAmt = (maxScrollLeft) * (scrollPct / 100);
element.scrollTo({
left: scrollAmt, // Replace with desired position
behavior: 'smooth' // Optional: for smooth scrolling
left: scrollAmt,
behavior: 'auto'
});
}


function calculateScroll(type, viewStartYear, displayYear, displayQuarter, numYears) {
const yearDiff = displayYear - viewStartYear;
const yearWidthOffsetPct = (((yearDiff / numYears)) * 100);
Expand Down

0 comments on commit 4471320

Please sign in to comment.