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

adjust canvas dimensions according to parameters of getscreenshot function #371

Merged
merged 1 commit into from
May 10, 2023

Conversation

Psychiquest
Copy link
Contributor

@Psychiquest Psychiquest commented Apr 18, 2023

When the getScreenshot function gets called the first time, it creates a canvas object with given dimensions (if provided). From the next time onwards, it uses the same canvas to draw images. So, if someone passes different parameters the next time, it still uses the canvas built using parameters provided in the first time.

If we resize the canvas before drawing the image, it would resolve this issue.

@Psychiquest Psychiquest changed the title adjust canvas dimensions based on given dimensions in getscreenshot function adjust canvas dimensions according to parameters of getscreenshot function Apr 18, 2023
@mozmorris
Copy link
Owner

Thanks @Psychiquest 👍

@mozmorris mozmorris merged commit bf5283c into mozmorris:master May 10, 2023
@jpserra
Copy link
Contributor

jpserra commented May 26, 2023

Hi @mozmorris , Any plans for a new release that includes this change? It solves an issue with inconsistent screenshot dimensions I was facing. Thank you!

@mozmorris
Copy link
Owner

mozmorris commented May 26, 2023 via email

@warrenseine
Copy link

v7.1.0 (thanks!)

@Psychiquest
Copy link
Contributor Author

@jpserra Did the new version fix your issue? When I pull 7.1.0 version from npm, I don't get the updated code. Is there some issue with npm registry?

@Psychiquest
Copy link
Contributor Author

Psychiquest commented Jun 7, 2023 via email

@warrenseine
Copy link

Wow, indeed, the 2-line change doesn't seem to be included in the bundle 😬

@mozmorris
Copy link
Owner

mozmorris commented Jun 7, 2023

Apologies @warrenseine @Psychiquest - need to migrate the prepublish in this package.

Patch has been released at 7.1.1

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

Successfully merging this pull request may close these issues.

None yet

4 participants