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

Push dragend event to overlay #1014

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

mstone121
Copy link
Contributor

@mstone121 mstone121 commented Aug 26, 2022

Currently, it's possible to listen to dragend for draggable edit handles like so:

layer.on('dragend', handleDragEditHandle)

There is, however, no way to listen to dragend in the event the whole layer is dragged. This PR adds this functionality by firing the layer dragend event when the layer's dragging property fires its dragend event.

Closes #1016


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 test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updates N/A, not a UI update
  • @mention the original creator of the issue in a comment below for help or for a review N/A, I created it.

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!

@welcome
Copy link

welcome bot commented Aug 26, 2022

Thanks for opening this pull request! Dangerbot will test out your code and reply in a bit with some pointers and requests.
There may be some errors, but don't worry! We're here to help! 👍🎉😄

@gitpod-io
Copy link

gitpod-io bot commented Aug 26, 2022

This lets users of the plugin listen for dragend events on the layer
rather than the layer's dragging property (which is not always set).
Copy link
Member

@jywarren jywarren left a comment

Choose a reason for hiding this comment

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

Thank you very much!!!

@jywarren jywarren merged commit 5d0468d into publiclab:main Sep 8, 2022
@welcome
Copy link

welcome bot commented Sep 8, 2022

Congrats on merging your first pull request! 🙌🎉⚡️
Your code will likely be published to https://mapknitter.org in the next few days.
In the meantime, can you tell us your Twitter handle so we can thank you properly?
Now that you've completed this, you can help someone else take their first step!
See: Public Lab's coding community!

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.

Fire Event on entire image drag
2 participants