Skip to content

Fix graphics size error#8545

Open
yugalkaushik wants to merge 2 commits intoprocessing:mainfrom
yugalkaushik:fix-graphics-size-error
Open

Fix graphics size error#8545
yugalkaushik wants to merge 2 commits intoprocessing:mainfrom
yugalkaushik:fix-graphics-size-error

Conversation

@yugalkaushik
Copy link
Contributor

Resolved #4956

Changes:

  • Added instanceof check in p5.Element.prototype.size() to detect p5.Graphics
  • Shows error directing users to resizeCanvas()
  • Added unit test to verify the error message is shown

PR Checklist

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.

size() throws error with p5.Graphics

1 participant