Add padding when taking template screenshot
This commit is contained in:
committed by
M. Shull
parent
92aa16131c
commit
159021233a
@@ -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);
|
||||||
|
Reference in New Issue
Block a user