Commit b2dea93f authored by lerma artemix's avatar lerma artemix
Browse files

Fixes a bug when switching in fullscreen mode. I reused a 2D class that used...

Fixes a bug when switching in fullscreen mode. I reused a 2D class that used an element with id=fullscreen that dit not exit in 3D mode
parent 87a535f6
......@@ -69,19 +69,27 @@ class Viewer {
** * the mode fullscreen
** *
** * If coordinatesFormatter is null, coordinates are not displayed
** *
** * Fullscreen mode is displayed in element with id = fullscreen if it exists (2D)
** *
*/
*/
let fullscreen_source = "fullscreen";
if(document.getElementById(fullscreen_source) === null){
fullscreen_source = "";
}
if(this.coordinatesFormatter !== null){
this.controls = [
new ol.control.MousePosition({
undefinedHTML: '',
coordinateFormat: this.coordinatesFormatter.format.bind(this.coordinatesFormatter)
}),
new ol.control.FullScreen({ source: 'fullscreen' })
new ol.control.FullScreen({ source: fullscreen_source })
];
}else{
this.controls = [
new ol.control.FullScreen({ source: 'fullscreen' })
new ol.control.FullScreen({ source: fullscreen_source })
];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment