Open ArtemisGraphic opened 2 years ago
@tsayen I have found this issue to be tied to the size of the image, mainly on mobile, is there any way or parameter to allow larger images to be rendered?
You can try generating twice domtoimage.toPng(node).then(function () { domtoimage.toPng(node).then(function (dataUrl) { this.url=dataUrl }); });
You can try generating twice domtoimage.toPng(node).then(function () { domtoimage.toPng(node).then(function (dataUrl) { this.url=dataUrl }); });
For those who like the async await syntax better
await domtoimage.toPng(node)
const url = await domtoimage.toPng(node)
I have a div with two divs inside, each one with a background image. When I render, the images are not displayed, but If I try a second time (and any subsequent time) the images will be displayed. One of the two is quite large (1200x800), the other is 400x300. How can I load them before the first render?
.board-overlay { background: url('/img/homebrew/board/overlay-faction-board.png') left top no-repeat; width: 100%; height: 100%; z-index: 2; }
.board-avatar-image{ background: url('/img/homebrew/board/avatar-1.jpg') left 25px no-repeat; width: 489px; height: 300px; position: absolute; z-index: 1; }