Fix smooth scroll easing for more consistent motion
All checks were successful
build-website / build (push) Successful in 1m30s
All checks were successful
build-website / build (push) Successful in 1m30s
- Changed from easeInOutCubic to easeInOutQuad for smoother motion - Increased duration from 1.5 to 1.8 seconds - Fixed jerky acceleration/deceleration issue - Now provides consistent, smooth scrolling throughout entire motion The scrolling is now properly smooth without the sudden speed changes.
This commit is contained in:
@@ -101,11 +101,11 @@ const handlePhoneClick = () => {
|
||||
}
|
||||
|
||||
const handleServicesClick = () => {
|
||||
scrollToElement('#services', 1500) // 1.5 seconds for slower scrolling
|
||||
scrollToElement('#services', 1800) // 1.8 seconds for smoother scrolling
|
||||
}
|
||||
|
||||
const handleScrollToExplore = () => {
|
||||
scrollToElement('#services', 1500) // Scroll to services section
|
||||
scrollToElement('#services', 1800) // Scroll to services section
|
||||
}
|
||||
|
||||
const handleVideoVisibility = () => {
|
||||
@@ -136,7 +136,7 @@ const initSmoothScroll = () => {
|
||||
if (!href) {
|
||||
return
|
||||
}
|
||||
scrollToElement(href, 1500) // 1.5 seconds for slower scrolling
|
||||
scrollToElement(href, 1800) // 1.8 seconds for smoother scrolling
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user