mapbox-gl-draw
mapbox-gl-draw copied to clipboard
v1.3.0 seems broken for drag
Because of the upgrade to geojson-extent [1] I think we are running into: https://github.com/mapbox/geojson-extent/issues/14
[1] https://github.com/mapbox/mapbox-gl-draw/commit/c12fb64b90d00e877e94b12b60bc3b80e42924dd

cc @mourner
I've been looking into this too, and it looks like v1.3.0 actually also introduced other breaking changes; The error there is misleading but I'm not sure why. That package does still exist, it's just not loaded correctly.
It seems to be related to the upgrade to @mapbox/geojson-extent, I've currently [email protected] working with [email protected] with the following added to my package.json, which forces that dependency to be downgraded:
"resolutions": {
"@mapbox/geojson-extent": "^0.3.2"
},
yeah in v1 they changed the exports in that package (geojson-extent)
Related:
- https://github.com/mapbox/geojson-extent/issues/14
- https://github.com/mapbox/geojson-coords/pull/2
@bartvde Can you share instructions on how to duplicate this bug?
@SnailBones sure I will provide them today
okay finally got it reproduced, I think it's related to custom draw modes actually, I couldn't reproduce it in vanilla mapbox-gl-draw modes.
See: https://github.com/bartvde/mapbox-react-examples/pull/1
And:

Thanks @bartvde! It looks like this fix was merged into geojson-coords, but it hasn't yet been released on NPM. Working on that now!