-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
Feature: coarse pointer tolerance #17102
Conversation
Thanks for your contribution! The pull request is marked to be Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the This PR depends on ZRender changes. Please update the ZRender dependency to the latest nightly version including this change, which takes place everyday at 8:00 UTC (16:00 Beijing Time). |
9bdf394
to
c11463a
Compare
To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: This message is shown because the PR description doesn't contain the document related template. |
3c8e39c
to
44e650e
Compare
44e650e
to
343b13a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me for now.
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Brief Information
This pull request is in the type of:
What does this PR do?
This PR is intended to increase elements' responsive size on mobile devices so that elements can be touched more easily.
The idea is inspired by Understanding Success Criterion 2.5.5: Target Size.
Fixed issues
Details
Before: What was the problem?
Small elements are hard to touch precisely on mobile devices in cases like scatter charts with small bubbles.
After: How is it fixed in this PR?
Touch position in increased by "pointer size" (default value is 44px) so that elements are easier to be touched.
Misc
Related test cases or examples to use the new APIs
I added an option to set
useCoarsePointer
to betrue
in the visual test framework, which forces increasing clicking area even for PC charts. The full visual test result is at Google Drive. I checked the failed cases, they are because we increased clicking area.API Changes
By default, only mobile devices will use this new feature. But if a developer decide to enable this for all platforms, one can set
useCoarsePointer
to betrue
when initializing ECharts.useCoarsePointer
('auto'
|true
|false
): whether to enable thie feature. If set to be'auto'
, it's turned on only for mobile devices.pointerSize
(number
): touch position is increased by this pointer size in diameter. Default value is 44.Charts that with
large
scale enabled will disable this feature.Others
Merging options
Other information