mapbox / mapbox/mapbox-gl-draw
Eliminate dependence on Map#fire – breaking change in mapbox-gl-js
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
mapbox-gl-js recently changed the function signature for `fire`, so our most recent beta release (https://github.com/mapbox/mapbox-gl-js/pull/6549) breaks compatibility with this library. see change log here https://github.com/mapbox/mapbox-gl-js/releases/tag/v0.45.0-beta.1
mapbox-gl-draw shouldn't be relying on `Map#fire` because it is not a public method, but if that is impossible, another option would be to call `fire` with an object that has a `type` attribute `{type: 'error', message: 'somethingbad', //... rest of the payload properties }`. We may also consider making the `Event` class public so third party libraries like this can use that constructor.
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
Review mapbox-gl-draw's uses of Map#fire alongside the mapbox-gl-js v0.45.0-beta.1 signature change described in the issue. Determine whether the dependency can be removed or whether the event-object alternative is required, then verify compatibility with the affected beta release.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100