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

Draw removes boxZoom but never restores it on removal

Open averas opened this issue 9 years ago • 5 comments

During setup Draw removes boxZoom (to be able to provide shift-box-selections instead):

https://github.com/mapbox/mapbox-gl-draw/blob/78fddb17520f2869902b2e6dbf93c1bf888cf421/src/setup.js#L39

But when draw is removed it never tries to enable it again.

averas avatar Dec 29 '16 04:12 averas

I tried to implement this in https://github.com/andrewharvey/mapbox-gl-draw/commit/1d72e54a85e82539970b9cc33606c3a826e6e2c1, but it's not ready for PR because when testing it seems like the map becomes stuck in pan mode...

andrewharvey avatar Jan 19 '17 11:01 andrewharvey

Probably related to https://github.com/mapbox/mapbox-gl-js/issues/2237

averas avatar Jan 19 '17 11:01 averas

Probably related to mapbox/mapbox-gl-js#2237

That sounds like the exact issue, will have to wait for that to be resolved before this issue can be addressed.

andrewharvey avatar Jan 19 '17 11:01 andrewharvey

Can anyone suggest a workaround for this?

mvl22 avatar Apr 14 '19 21:04 mvl22

As a workaround call map.boxZoom.enable() after removeControl manually

kibala145 avatar Oct 01 '20 12:10 kibala145