Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] generated image gets cut off #225

Open
Sorvereign opened this issue Dec 12, 2021 · 2 comments
Open

[Bug] generated image gets cut off #225

Sorvereign opened this issue Dec 12, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Sorvereign
Copy link

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

@Sorvereign Sorvereign added the bug Something isn't working label Dec 12, 2021
@Sorvereign
Copy link
Author

I think this project is no longer maintained...

@Sorvereign
Copy link
Author

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])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants