salgum1114/react-design-editor

[Bug] generated image gets cut off

Opened this issue · 2 comments

Describe the bug
Am trying to generate the image from the json exported from the editor but the image gets cut off.

I don't know very well what's the problem but I notice that the image is moved to the left from the workarea the same as the value in the image object

"type":

"image",

"version": "3.6.6",

"originX": "left",

"originY": "top",

"left": 70.74,

"top": 43.5,

If i substract "70" and "43" in the "left" and "top" properties in all objects i get the image centered. I don't know if is a problem with Fabricjs or a bug with the editor

I think this project is no longer maintained...

I just solved, to anyone with the problem

I substract from the viewport the difference Like this

canvas.setViewportTransform([1, 0, 0, 1, -70, -40])