We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3162a3 commit 1e507b2Copy full SHA for 1e507b2
1 file changed
app/javascript/maplibre/edit.js
@@ -161,6 +161,13 @@ export async function initializeEditMode () {
161
(draw.getMode() === 'simple_select' || draw.getMode().startsWith('directions_'))) {
162
map.fire('click', e) // attach original event for coordinates
163
}
164
+ // Fix for mapbox-gl-draw issue #650: after a touch-drag, the draw library's
165
+ // state machine can fail to re-enable dragPan, freezing the map.
166
+ // Run after draw's own touchend handler via setTimeout to restore it.
167
+ const mode = draw.getMode()
168
+ if (mode === 'simple_select' || mode === 'direct_select') {
169
+ setTimeout(() => map.dragPan.enable(), 0)
170
+ }
171
})
172
173
map.on('online', (_e) => { enableEditControls() })
0 commit comments