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

Reset Canvas translate after finishing #1494

Closed
TheCheif opened this issue Apr 5, 2018 · 0 comments
Closed

Reset Canvas translate after finishing #1494

TheCheif opened this issue Apr 5, 2018 · 0 comments
Labels

Comments

@TheCheif
Copy link

TheCheif commented Apr 5, 2018

Hi,

after Rendering with your Library i tried to draw additional Text to the Canvas which never worked. So I went through your Code and found that you use ctx.translate which changes the default Location where you draw. Maybe you should reset the translation after you are finished with Rendering. This could be done with just one simple Line of Code:

ctx.setTransform(1, 0, 0, 1, 0, 0);

I made an example in JSFiddle to show what i mean
JSFiddle

Just uncomment the Line which I marked and the Text is at the Right position.

Other than that, your Library is great!
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants