Open jwoodwardtfx opened 4 years ago
I've been using mapbox-gl-draw and have been fighting the issue of sometimes while dragging a vertex or point, the map suddenly begins to zoom. First I thought it was a bug in my code, then a bug in a Draw, and now, I'm finally discovering (seriously after YEARS) of futzing with this, that it's a mapbox-gl "feature". The current state of affairs is bogus when using Draw on touch devices, since I can't selectively disable just single finger tap zoom without resetting private members every time the control is enabled/disabled.
Everyone using Draw will want this disabled by default.
The TouchZoomRotateHandler support various gestures ("zoom rotate", "pinch zoom/touch zoom", "single finger zoom/tap then drag"), however it only allows you to disable the "zoom rotate" gesture.
The individual gestures can be disabled by diving in to the private members (such as by calling "map.touchZoomRotate._tapDragZoom.disable();").
It would be nicer to have a match for disableRotation()/enableRotation() to turn on/off each supported gesture (i.e. add a disableTapZoom()/enableTapZoom()).