mapbox-gl-draw
mapbox-gl-draw copied to clipboard
Disable click callback on polygons
After drawing a polygon, wondering if there is a way to disable (and later enable) event listener for polygon click? The reason being that I'm developing a map that has a lot of layers/features and they can overlap with the draw. I hope to disable draw interactions when user is intended to play with other features. Thanks!
Hi @xhuang26 do you get something regarding this. I was also working in similar problem but my scenario was that when a polygon is drawn we have to disable interactions with polygon so i created a custom mode and when the polygon is drawn on the screen selectionChange event is called and then i am changing my mode to the custom mode which i have created
I've also used a change to "static" mode to get around this issue