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

Using arrow keys to move image #534

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

anthony-zhou
Copy link
Member

Fixes #338 (<=== Add issue number here)

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with grunt
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updates
  • @mention the original creator of the issue in a comment below for help or for a review

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@anthony-zhou
Copy link
Member Author

@publiclab/reviewers I'm not sure exactly how to approach this, but I am considering looking for where the arrow keys are handled and then implementing this feature there. Does anyone know where the map-moving arrow key listeners are handled? Is creating a new Action the right way to implement this? Thanks.

@sashadev-sky
Copy link
Member

@anthony-zhou the map-moving arrow key listeners are handled in the Leaflet library, so you would need to override that functionality. I would recommend creating a new class for this, you can use the L.Map.BoxCollector as an example.

The action route would work, but in the context of what we use actions for doesn't fit because we're thinking to always have arrow key moving available on a selected image, rather than having it be a toggleable functionality in the toolbar. Does that make sense?

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.

Feature: arrow-key placement
2 participants