Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions app/static/app/js/components/MapPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import Standby from './Standby';
import exifr from '../vendor/exifr';
import '../vendor/leaflet/leaflet-markers-canvas';
import { _, interpolate } from '../classes/gettext';
import 'leaflet-fullscreen/dist/Leaflet.fullscreen';
import 'leaflet-fullscreen/dist/leaflet.fullscreen.css';

const Colors = {
fill: '#fff',
Expand Down Expand Up @@ -116,6 +118,34 @@ _('Example:'),
baseLayers: this.basemaps
}).addTo(this.map);

this.map.addControl(new L.Control.Fullscreen({
position: 'bottomleft'
}));

var fullscreenchange;

if ('onfullscreenchange' in document) {
fullscreenchange = 'fullscreenchange';
} else if ('onmozfullscreenchange' in document) {
fullscreenchange = 'mozfullscreenchange';
} else if ('onwebkitfullscreenchange' in document) {
fullscreenchange = 'webkitfullscreenchange';
} else if ('onmsfullscreenchange' in document) {
fullscreenchange = 'MSFullscreenChange';
}

if (fullscreenchange) {
var onFullscreenChange = L.bind(this.map._onFullscreenChange, this.map);

this.map.whenReady(function () {
L.DomEvent.on(document, fullscreenchange, onFullscreenChange);
});

this.map.on('unload', function () {
L.DomEvent.off(document, fullscreenchange, onFullscreenChange);
});
}

this.map.fitBounds([
[13.772919746115805,
45.664640939831735],
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "WebODM",
"version": "2.5.6",
"version": "2.5.7",
"description": "User-friendly, extendable application and API for processing aerial imagery.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -47,6 +47,7 @@
"jest": "^23.4.1",
"json-loader": "^0.5.4",
"leaflet": "1.3.1",
"leaflet-fullscreen": "^1.0.2",
"object.values": "^1.0.3",
"proj4": "^2.4.3",
"qrcode.react": "^0.7.2",
Expand Down
Loading