ml5js / ml5-website-v02-gatsby

A work-in-progress repo for the new website of ml5.js
https://ml5js.org/
MIT License
0 stars 8 forks source link

Add useEffect hook to set src for iframe after the window is fully loaded #10

Closed alanvww closed 2 weeks ago

alanvww commented 2 weeks ago

Update: It doesn't work in the deploy preview :(

netlify[bot] commented 2 weeks ago

Deploy Preview for ml5-next-gen ready!

Name Link
Latest commit a3243968900692645e63be4e04a92ed3b8f4b139
Latest deploy log https://app.netlify.com/sites/ml5-next-gen/deploys/666a527da96c8600081db973
Deploy Preview https://deploy-preview-10--ml5-next-gen.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

alanvww commented 2 weeks ago

Looks like the iframe error is from the p5 sketch and the rendering of gatsby/react didn't work correctly when the user went back from the docs.

Uncaught (in promise) DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.

MOQN commented 2 weeks ago

Thank you! Merging this.