-
-
Notifications
You must be signed in to change notification settings - Fork 229
Description
I'm unsure if this is a configuration problem on client side, but if the target element of snapshot has a margin, the output image will be clipped. Below I have added a margin to the demo box and this was the result:
Demo: https://codepen.io/Talcite/pen/zxGmjYa
The image generation viewport seems to have "remembered" the position of the element and stick to that way, assuming it has no margin. Therefore, it no longer reflect the true position of the element.
Besides, the dimensions of exported PNG (and the SVG viewport) are not exactly the same as the displayed pixel dimension of the target element; the image is usually larger. This is not a real concern though, but I hope that the feature will be added in the future to allow user to specify an exact value of output image size (have seen this request in another issue), or the only way left is to fumble with the scale option and do some math.