Open Pantoeflou opened 7 years ago
Hi Guys,
I am using the mapbox-gl-compare plugin on top of a map that displays inside a container.
I am now trying to add a 'fullscreen button', but to no avail
Using: after.addControl(new mapboxgl.FullscreenControl()); displays the the button, but only makes the 'after' map full screen
I then tried creating my own function where I do the following on click:
make panel fullscreen [css below]
call resize() function on before, after and map objects
This sort of works, the fullscreen view renders the map (ans slider) at what seems just over 200% height
Any possibility of adding support for the FullscreenControl() function
.panel-fullscreen { display: block; z-index: 9999; position: fixed; width: 100%; height: 100%; top: 0; right: 0; left: 0; bottom: 0; overflow: auto; }
+1
@Pantoeflou See #14 for a pull request for this feature if accepted by the moderators.
Hi Guys,
I am using the mapbox-gl-compare plugin on top of a map that displays inside a container.
I am now trying to add a 'fullscreen button', but to no avail
Using: after.addControl(new mapboxgl.FullscreenControl()); displays the the button, but only makes the 'after' map full screen
I then tried creating my own function where I do the following on click:
make panel fullscreen [css below]
call resize() function on before, after and map objects
This sort of works, the fullscreen view renders the map (ans slider) at what seems just over 200% height
Any possibility of adding support for the FullscreenControl() function
.panel-fullscreen { display: block; z-index: 9999; position: fixed; width: 100%; height: 100%; top: 0; right: 0; left: 0; bottom: 0; overflow: auto; }