mapbox-gl-draw icon indicating copy to clipboard operation
mapbox-gl-draw copied to clipboard

v1.3.0 seems broken for drag

Open bartvde opened this issue 4 years ago • 7 comments

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

Screenshot from 2021-05-27 12-58-53

cc @mourner

bartvde avatar May 27 '21 10:05 bartvde

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"
  },

ThisIsMissEm avatar May 27 '21 12:05 ThisIsMissEm

yeah in v1 they changed the exports in that package (geojson-extent)

bartvde avatar May 27 '21 12:05 bartvde

Related:

  • https://github.com/mapbox/geojson-extent/issues/14
  • https://github.com/mapbox/geojson-coords/pull/2

ThisIsMissEm avatar May 27 '21 12:05 ThisIsMissEm

@bartvde Can you share instructions on how to duplicate this bug?

SnailBones avatar Sep 10 '21 22:09 SnailBones

@SnailBones sure I will provide them today

bartvde avatar Sep 13 '21 06:09 bartvde

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: Peek 2021-09-13 17-35

bartvde avatar Sep 13 '21 15:09 bartvde

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!

SnailBones avatar Sep 13 '21 21:09 SnailBones