react-mapbox-gl-draw icon indicating copy to clipboard operation
react-mapbox-gl-draw copied to clipboard

Controls option show/hide threw state not working

Open Anand-rana opened this issue 4 years ago • 3 comments

1: create controls state state = controls: { polygon: true, trash: true, }, }

  1. Hide contorls when change state . onDrawCreate = () => { this.setState({ controls: { polygon: false } }); };

controls not hide in jsx.

Anand-rana avatar May 12 '20 09:05 Anand-rana

Hi, same issue here, any idea @amaurymartiny ? Thank you for your work, the drawer is great!

CMonjo avatar Sep 08 '20 15:09 CMonjo

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.

rogeriocsilva avatar Sep 11 '20 17:09 rogeriocsilva

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! :)

CMonjo avatar Sep 15 '20 15:09 CMonjo