Fix jarring scroll with linear constant-speed motion
All checks were successful
build-website / build (push) Successful in 1m29s
All checks were successful
build-website / build (push) Successful in 1m29s
- Replace easeInOutSine with linear easing (return t) - Reduce duration from 1200ms to 800ms for snappier feel - Update all component references to use new duration Linear easing provides constant-speed scrolling without any acceleration or deceleration, eliminating the jarring effect.
This commit is contained in:
@@ -101,11 +101,11 @@ const handlePhoneClick = () => {
|
||||
}
|
||||
|
||||
const handleServicesClick = () => {
|
||||
scrollToElement('#services', 1200) // Smooth scrolling with sine easing
|
||||
scrollToElement('#services', 800) // Constant-speed smooth scrolling
|
||||
}
|
||||
|
||||
const handleScrollToExplore = () => {
|
||||
scrollToElement('#services', 1200) // Smooth scroll to services section
|
||||
scrollToElement('#services', 800) // Constant-speed scroll to services
|
||||
}
|
||||
|
||||
const handleVideoVisibility = () => {
|
||||
@@ -136,7 +136,7 @@ const initSmoothScroll = () => {
|
||||
if (!href) {
|
||||
return
|
||||
}
|
||||
scrollToElement(href, 1200) // Smooth scrolling with sine easing
|
||||
scrollToElement(href, 800) // Constant-speed smooth scrolling
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user