react-mapbox-gl-draw
react-mapbox-gl-draw copied to clipboard
Controls option show/hide threw state not working
1: create controls state state = controls: { polygon: true, trash: true, }, }
- Hide contorls when change state . onDrawCreate = () => { this.setState({ controls: { polygon: false } }); };
controls not hide in jsx.
Hi, same issue here, any idea @amaurymartiny ? Thank you for your work, the drawer is great!
Same here. I don't thinks it's possible right now, there's even an open PR on the original repo (https://github.com/mapbox/mapbox-gl-draw/pull/922) . My workaround was deleting the previous drawn points/polygon, every time a new one is created.
Same here. I don't thinks it's possible right now, there's even an open PR on the original repo (mapbox/mapbox-gl-draw#922) . My workaround was deleting the previous drawn points/polygon, every time a new one is created.
Indeed I had not thought of doing that. Thanks for the idea! :)