An ArcGIS JS V4 widget that uses the Fullscreen API.
Include the style, create the widget, then add it to your map UI
require([
"custom-widgets/FullScreen"
], function(FullScreen) {
// create your map and view
var toggle = new FullScreen({
view: view,
hideIfFullScreenDisabled: false // default is true
});
view.ui.add(toggle, "top-right");
Get it from here or via npm npm install arcgis-fullscreen-widget --save
Download / clone this repository then run npm install
> npm start
This uses screenfull internally and was influenced by existing leaflet plugins like https://github.com/brunob/leaflet.fullscreen and https://github.com/Leaflet/Leaflet.fullscreen