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

Added window size check upon p5 instantiation #7134

Merged
merged 3 commits into from
Jul 19, 2024
Merged

Added window size check upon p5 instantiation #7134

merged 3 commits into from
Jul 19, 2024

Conversation

bensgilbert
Copy link
Contributor

Resolves #7133

Changes:
Adds a function called upon p5 initialisation which fixes a bug where windowWidth and windowHeight would represent the correct values when the window was resized and no p5 sketch was active

Video of the before:
https://github.com/user-attachments/assets/82ebad21-5d55-4203-870b-184f9b8775e8

PR Checklist

bensgilbert and others added 2 commits July 17, 2024 22:27
This fixes a bug where `windowWidth` and `windowHeight` would represent the correct values when the window was resized and no p5 sketch was active
Copy link

welcome bot commented Jul 17, 2024

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

Copy link
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for helping narrow down the cause of this bug!

src/core/main.js Outdated Show resolved Hide resolved
@bensgilbert
Copy link
Contributor Author

I've just updated where the function is called to run before the init handlers as you suggested

@bensgilbert bensgilbert requested a review from davepagurek July 19, 2024 02:25
Copy link
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making those changes, looks great!

@davepagurek davepagurek merged commit e992412 into processing:main Jul 19, 2024
2 checks passed
@davepagurek
Copy link
Contributor

@all-contributors please add @Evorage0 for bug, code

Copy link
Contributor

@davepagurek

I've put up a pull request to add @Evorage0! 🎉

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.

Inconsistent instance mode canvas sizing
2 participants