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

Auspice map scroll behavior broken #223

Closed
jameshadfield opened this issue Sep 28, 2020 · 1 comment
Closed

Auspice map scroll behavior broken #223

jameshadfield opened this issue Sep 28, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@jameshadfield
Copy link
Member

Current Behavior

In nextstrain.org when you mousewheel-scroll while the cursor is over the map we zoom into the map (no keys are pressed for this to happen). In auspice, an overlay appears over the map instructing you to "command+scroll to zoom". The exact message will differ depending on OS and comes from this leaflet plugin.

Expected behavior

Nextstrain.org should behave like auspice here -- scrollwheel with no key pressed should scroll the page, not zoom the map, and the map overlay should appear.

How to reproduce
Steps to reproduce the current behavior:

  1. Open / run nextstrain.org/zika
  2. Position the mouse over the map
  3. Use the scroll-wheel / trackpad to scroll

Your environment

  • Browser: Firefox 81.0, Safari 13.1.2
  • Version: Auspice 2.18.3 (works when vanilla auspice, broken when part of nextstrain.org)
  • Locally-running nextstrain.org server behaves the same as live nextstrain.org
@jameshadfield jameshadfield added the bug Something isn't working label Sep 28, 2020
@jameshadfield
Copy link
Member Author

jameshadfield commented Sep 28, 2020

This is caused by an updated leaflet library in nextstrain.org which was incompatible with the leaflet-gesture-handling plugin we were using (see elmarquis/Leaflet.GestureHandling#58).

Auspice is using leaflet version 1.6.0 (as per the package-lock, package.json specifies "^1.6.0").

Nexstrain.org's package-lock specified 1.7.1 (pulled in via auspice's package.json I think). This happened inadvertently on this commit because auspice didn't pin the version of leaflet tightly enough.

Downgrading nextstrain.org's leaflet library to 1.6.0 fixes this, however the best route for this is to pin versions of leaflet / leaflet-gesture-handling in auspice.

jameshadfield added a commit to nextstrain/auspice that referenced this issue Sep 28, 2020
The leaflet library wasn't pinned correctly resulting in recent
installs of auspice using 1.7.1 which was incompatible with versions
of leaflet-gesture-handling allowed by auspice. See
nextstrain/nextstrain.org#223 for more
information.

This commit fixes the problem by updating both libraries which allows us
to use an improved version of leaflet. The versions are now pinned
exactly preventing this issue in future.
jameshadfield added a commit that referenced this issue Sep 28, 2020
Minor improvements which arose as part of debugging #223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant