Skip to content

Support touch events#16

Merged
gabrielhase merged 2 commits intomasterfrom
touchevent-support
Jan 6, 2021
Merged

Support touch events#16
gabrielhase merged 2 commits intomasterfrom
touchevent-support

Conversation

@gabrielhase
Copy link
Copy Markdown
Member

Motivation

Previously, the crop controls did only work for desktop devices, not for mobile, i.e. touch devices.
With this change, the cropping can also be performed from a mobile device.

Changelog

  • Introduce touchstart, touchmove and touchend events next to the equivalent mouse events (since we use namespaces on the events, it is necessary to explicitly declare the touch events)
  • handle the calculation of pageX and pageY for both mobile and desktop cases

@gabrielhase gabrielhase requested a review from peyerluk December 22, 2020 22:47
Comment thread examples/fit-to-area.html Outdated
@gabrielhase gabrielhase merged commit 9a54d6a into master Jan 6, 2021
@delete-merged-branch delete-merged-branch Bot deleted the touchevent-support branch January 6, 2021 15:39
@livingdocs-automation
Copy link
Copy Markdown

🎉 This PR is included in version 2.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants