mapbox / mapbox/mapbox-gl-draw
Draw cursor not set to "crosshair" if default cursor of map is set to "default" or "pointer"
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
Draw cursor not set to "crosshair" if default cursor of map is set to "default" ,"pointer" or anything else maybe.
The draw cursor is set to "crosshair" only when the cursor style is not explicitly set.
For example if I do
`map.getCanvas().style.cursor = "default"`
The draw cursor is also set to "default"
But if I just remove the above-mentioned line, the draw cursor is set to "crosshair" upon selecting a draw mode.
**mapbox-gl-js 1.0.0**:
**mapbox-gl-draw 1.1.2**:
### Steps to Trigger Behavior
1. Set map cursor to anything explicitly, for example
`map.getCanvas().style.cursor = "default"`
2. Select a shape to draw
3. See the cursor to be set as "default" instead of "crosshair"
### Expected Behavior
Cursor is to be set to crosshair when a draw mode is selected.
### Actual Behavior
Cursor is not set to crosshair when a draw mode is selected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the listed steps with mapbox-gl-js and mapbox-gl-draw, then trace the draw-mode cursor handling from the draw mode entry point. Done means selecting a shape-drawing mode sets the cursor to "crosshair" even when the map canvas cursor was explicitly set to "default" or "pointer".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100