Skip to content

Canvas scaling on the example pages breaks mouse click events #371

@cart

Description

@cart

In retrospect, this makes sense given that we're working around winit by scaling the canvas directly. I don't think we should revert canvas scaling, as it makes the examples visible on mobile / smaller screens and that feels worth it to me.

This seems like it would properly fix our problem, if merged:
rust-windowing/winit#2074

In the interim, we should consider "mitigating quality perception damage". Some ideas:

  1. Disable canvas scaling for examples that care about absolute mouse position and go back to a fixed size canvas.
  2. Flag examples that care about absolute mouse position and add a warning to their page (maybe with a link to this issue).
  3. Just remove examples that care about absolute mouse position until we have a fix.
scaling.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ExamplesC-BugA problem with the code that runs the siteS-Needs-InvestigationWe need to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions