-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Problem with p5.Element.size() in Chrome/Chromium #613
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
Comments
When
|
closed with 9015ffe |
@lmccart @futuremarc |
Actually, you can pass in a function to either the 2nd or 3rd arg, so you dont need to provide an |
oh, my bad: updated only p5.js and not p5.dom.js — so I was using an older version. |
After trying out this example from the Beyond the Canvas tutorial, I discovered that setting either the width or height argument of the
p5.Element.size()
function toAUTO
renders the affected<img>
element invisible 🙈 in Chrome or Chromium, though everything works fine in Firefox. The failed tests were made in Chrome Version 42.0.2311.135 /w Windows 8.1 Pro (64-bit) and Chromium Version 41.0.2272.76 /w Ubuntu 14.10 (64-bit). Viewing the elements using the Chrome DevTools discloses the reason behind: whichever argument set toAUTO
actually becomes zero. That is, following the aforementioned example and callingimg.size(200, AUTO);
will result in an<img>
element withwidth="200" height="0"
.The text was updated successfully, but these errors were encountered: