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

Skip out of canvas shapes for gridOutput() table #7135

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

limzykenneth
Copy link
Member

Resolves #7130

Changes:

Add a check to see if the shape being iterated by gridOutput() is within the bounds of the canvas. If it is out of the canvas it won't be added to the table generated by gridOutput() (which only has entries for things within the canvas bounds).

PR Checklist

@Qianqianye Qianqianye merged commit 46c5226 into processing:main Jul 18, 2024
2 checks passed
@limzykenneth limzykenneth deleted the oob-gridoutput branch July 18, 2024 20:01
@eyaler
Copy link

eyaler commented Dec 3, 2024

@limzykenneth i still see a same or similar issue with 1.11.2 due to line exceeding y bound - just realized this is an older bugfix - but see here for minimal code to trigger the error: #7259 (comment)

p5.js:62630 ┌[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.2/p5.js:53353:127]
Error at line 53353 in _gridMap()
└[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.2/p5.js:53318:26]
Called from line 53318 in _main.default._updateGridOutput()
└[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.2/p5.js:53870:20]
Called from line 53870 in _main.default._updateAccsOutput()
└[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.2/p5.js:79152:22]
Called from line 79152 in _main.default.redraw()
└[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.2/p5.js:66337:23]
Called from line 66337 in _draw()

p5.js:53353 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at _gridMap (p5.js:53353:127)
at _main.default._updateGridOutput (p5.js:53318:26)
at _main.default._updateAccsOutput (p5.js:53870:20)
at _main.default.redraw (p5.js:79152:22)
at _draw (p5.js:66337:23)

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.

Text-based canvas accessibility throws error on out-of-Y-bounds shapes
3 participants