Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add background wave parallax #56

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add background wave parallax #56

wants to merge 1 commit into from

Conversation

ky28059
Copy link
Member

@ky28059 ky28059 commented Sep 9, 2021

This PR is to test whether the parallax is just as choppy on the production build as it is on localhost.

@github-actions
Copy link

github-actions bot commented Sep 9, 2021

Visit the preview URL for this PR (updated for commit f819c37):

https://gunnwatt--pr56-parallax-uc5oaglu.web.app

(expires Thu, 16 Sep 2021 18:27:23 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Comment on lines +16 to +19
document.addEventListener('wheel', handleScroll);
return function cleanup() {
document.removeEventListener('wheel', handleScroll);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the scroll event since that's the actual event that is dispatched when the scroll position changes. The wheel event is dispatched when the scroll wheel moves, but that is not a perfect correlation with scrolling; the scroll wheel is also used for zooming (zooming by pinching with the trackpad dispatches wheel events with ctrlKey set to true), and the page can be scrolled without using the scroll wheel (using a finger, arrow keys, tab key, URL fragments, and Windows smooth scrolling)

@ky28059 ky28059 marked this pull request as draft March 7, 2022 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants