Closed cailongl closed 5 years ago
I have the same issue
Here is my solution, I hope this will be helpful for you
// use style option to set margin to 0
domtoimage.toSvg(this.ref, {
quality: 1,
style: {
margin: 0
}
})
@Homer1011110 thanks a lot, it worked.
I have the same issue
Here is my solution, I hope this will be helpful for you
// use style option to set margin to 0 domtoimage.toSvg(this.ref, { quality: 1, style: { margin: 0 } })
Thank you!
Use case: description, code
Expected behavior
I want get a jpeg is not offsetX, and it full with the width. The dom that i want get is center of screen.but i want the image not with offsetX
Actual behavior (stack traces, console logs etc)
Library version
"dom-to-image": "^2.6.0",
Browsers