X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git;a=blobdiff_plain;f=frontend%2Fjs%2Fapp.js;h=f532bc1e508515a9196329474af9e53450644ce9;hp=9ce073e39383afa76c0a2ad189bfeabdce131e33;hb=2d28c88dd7a6765a6d2ed54758bbb4c3da999331;hpb=313dfe99cf8f763b36f333c5072e2430a6b7941f diff --git a/frontend/js/app.js b/frontend/js/app.js index 9ce073e..f532bc1 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -150,7 +150,15 @@ function open(row, column, event) { app.activeEntry.fullPath = encode(sanitize(app.path + '/' + row.filePath)); app.previewDrawerVisible = true - // window.open(encode(path)); + // need to wait for DOM element to exist + setTimeout(function () { + $('iframe').on('load', function (e) { + if (!e.target.contentWindow.document.body) return; + + e.target.contentWindow.document.body.style.display = 'flex' + e.target.contentWindow.document.body.style.justifyContent = 'center' + }); + }, 0); } function uploadFiles(files) {