Resolves #420 Camera view on entity page

This commit is contained in:
Yegor Vialov
2020-02-20 11:18:09 +00:00
parent 92e008a380
commit 2f4c06e9b5
4 changed files with 39 additions and 16 deletions

View File

@ -0,0 +1,18 @@
function fixCameraImgView() {
var img = document.getElementsByTagName('img');
if (img && img.length) {
img[0].setAttribute('width', document.body.clientWidth);
img[0].setAttribute('style', 'margin-top: ' + ((document.body.clientHeight - img[0].offsetHeight) / 2));
}
var ovrl = document.getElementById('appOverlay');
if (ovrl) {
ovrl.remove();
}
}
window.bodyDetectInterval = setInterval(function() {
if (document.body != null) {
setTimeout(fixCameraImgView, 1000);
}
}, 100);