Add padding when taking template screenshot

This commit is contained in:
Amine Ben hammou
2019-04-02 00:03:54 +02:00
committed by M. Shull
parent 92aa16131c
commit 159021233a

View File

@@ -25,7 +25,9 @@ export const fromUrl = url => new Promise((resolve, reject) => {
iframe.style.opacity = 0; iframe.style.opacity = 0;
iframe.scrolling = 'no'; iframe.scrolling = 'no';
iframe.onload = () => { iframe.onload = () => {
fromDom(iframe.contentDocument.documentElement) const container = iframe.contentDocument.documentElement
container.style.padding = '10px 20px'
fromDom(container)
.then((image) => { .then((image) => {
document.body.removeChild(iframe); document.body.removeChild(iframe);
resolve(image); resolve(image);