Resolves #420 Camera view on entity page
This commit is contained in:
18
assets/js/cameraImgViewHelper.js
Normal file
18
assets/js/cameraImgViewHelper.js
Normal 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);
|
Reference in New Issue
Block a user