echarts
echarts copied to clipboard
feat(dataZoom): change moveHandler cursor icon to move
Brief Information
This pull request is in the type of:
- [ ] bug fixing
- [x] new feature
- [ ] others
What does this PR do?
Change cursor icon to more intuitive 'move', for dataZoom slider moveHandle
Fixed issues
- #20303
Details
Before: What was the problem?
The Move/Drag icon is not intuitive, and it makes it difficult to know whether you're busy resizing or dragging, when the mouse is nearby the edge.
| Original Move/Drag icon | New Move/Drag icon |
|---|---|
Document Info
One of the following should be checked.
- [x] This PR doesn't relate to document changes
- [ ] The document should be updated later
- [ ] The document changes have been made in apache/echarts-doc#xxx
Misc
ZRender Changes
- [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
- [ ] Please squash the commits into a single one when merging.
Other information
Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.
I did some more research, and it appears that the main icon used for movement in a restricted container is the 'default' icon.
The main examples are scrollbars, in browser windows or other applications:
| Example scrollbar in Excel | Example scrollbar in VSCode |
|---|---|
My main issue with the current icon, is for the case below:
It is not obvious from a UX perspective, whether the mouse is going to resize or move the view. In the image above it will actually move the container, but if you shift the cursor 1 pixel down it will resize. But that slight movement has no visual changes/indication to the user as to what will happen.
Therefore I propose to change the movement cursor to the 'default' cursor, as used in scrollbars.
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-20304@7fe6fa2
Congratulations! Your PR has been merged. Thanks for your contribution! 👍