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 passive scroll #631
Add passive scroll #631
Conversation
@itsmichaeldiego this is the only place in this lib where it needs a passive event - so it should get rid of the warnings in the console and things should be a bit smoother (so yes its related to #625) Come to think of it, i might as well add this to the other 4 event listeners too: google-map-react/src/google_map.js Line 248 in 6d142cb
|
@jooj123 Sounds good, maybe we can create a new method call |
@itsmichaeldiego updated. Not sure how i can unit test this as its browser specific functionality |
@jooj123 That is fine man! Thanks for this! Could you provide something like a video or whatever so I can see this is working? I really want to merge this but I've no time to test it :( |
@jooj123 Bump! |
@itsmichaeldiego sorry havent had a chance to test this one - will do sometime over the weekend or next week It would be much easier if the internal demo worked in this repo :( |
@jooj123 What do you mean that the internal demo worked? We're working on new examples at https://github.com/google-map-react/google-map-react-examples |
This reverts commit 40c8f67.
* 'master' of github.com:google-map-react/google-map-react: Bump to 1.1.1 (google-map-react#680) Revert "Added feature: update heat map on data change + fix linting" (google-map-react#679) Bump version to 1.1.0 (google-map-react#671) Added feature: update heat map on data change + fix linting (google-map-react#593) Pass map instance to onDrag handler (google-map-react#656) add math abs to avoid negative values when calculating zoom (google-map-react#655) Bump version to 1.0.9 (google-map-react#651) Custom div style options (google-map-react#634) Bump version to 1.0.8 (google-map-react#646) Revert 643 fix/map context (google-map-react#645) Bump version to 1.0.7 (google-map-react#644) Add passive scroll (google-map-react#631) Use React 16 portal to render map overlay (google-map-react#643) Fix old examples links and add one to new examples (google-map-react#633) Bump version to 1.0.6 (google-map-react#621) Add prop `onTilesLoaded` (google-map-react#615) Fix typo, and call fromContainerPixelToLatLng() as you would expect. (google-map-react#620) Update API.md (google-map-react#611) Upgrade version to 1.0.5 (google-map-react#607) Remove marker jiggle. (google-map-react#603)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Added passive scroll event (which is more performant).
See: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener (
passive
in options)Needed the feature detection for browsers that dont support it
Note: hard to test this as the demos for
google-map-react
are all busted due to incorrect google maps key