Skip to content

Problem with p5.Element.size() in Chrome/Chromium #613

Closed
@xty

Description

@xty

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 to AUTO 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 to AUTO actually becomes zero. That is, following the aforementioned example and calling img.size(200, AUTO); will result in an <img> element with width="200" height="0".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions