I have a React app with an instance of a Mapbox GL map inside a container that I am allowing my users to adjust the width and height of. On that map I've called addControl() to add a NavigationControl.
Is there a way to toggle the visibility of the NavigationControl based on the width / height of my container (which are being passed down to the container as props), much in the same way I can change the visibility
of a layer by calling [setLayoutProperty(https://www.mapbox.com/mapbox-gl-js/api#map#setlayoutproperty)]?
I thought about adding and removing the control but per the documentation, the returned value of addControl()
is the map itself, and I don't see any place where I can access the current controls being displayed.