mapbox / mapbox-gl-draw

Draw tools for mapbox-gl-js
https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
ISC License
955 stars 593 forks source link

Adding drawControl appear to break map click + drag zoom #651

Closed benheb closed 7 years ago

benheb commented 7 years ago

mapbox-gl-js version: 0.37.0 and 0.28.0 mapbox-gl-draw version: v0.18.0

Steps to Trigger Behavior

  1. Add the drawing control to map: map.addControl(this.draw, 'bottom-right');
  2. Hold shift, click down on map and drag
  3. Observe light box that is drawn over map

Expected Behavior

When release click, map should zoom to extent of box

zoom-works

Actual Behavior

Nothing happens

zoom-busted

I observe the same issue here: https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/

mcwhittemore commented 7 years ago

Brendan,

This is expected behavior with a way to opt out. If you set boxSelect to false when setting up MapboxDraw you should be good. Here is where you can find this in the docs.

I hope that helps.

Matthew

benheb commented 7 years ago

@mcwhittemore thanks!!

nreese commented 3 years ago

This is expected behavior with a way to opt out. If you set boxSelect to false when setting up MapboxDraw you should be good. Here is where you can find this in the docs.

Updated link find this in the docs