iframe resizer use internal body, plus margin
authorken <ken@mihrtec.com>
Sat, 31 Mar 2018 00:59:49 +0000 (17:59 -0700)
committerken <ken@mihrtec.com>
Sat, 31 Mar 2018 00:59:49 +0000 (17:59 -0700)
static/js/main.js

index b0ada37..13c4dae 100644 (file)
@@ -22,5 +22,5 @@ window.onload = () => {
 }
 const resizeIFrame = (iframe) => {
   iframe.style.height = 0
 }
 const resizeIFrame = (iframe) => {
   iframe.style.height = 0
-  iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
+  iframe.style.height = (iframe.contentWindow.document.body.scrollHeight * 1.2) + 'px';
 }
 }