Skip to content

Improve device-pixel-content-box notifications when switching resolutions #92

@TremayneChrist

Description

@TremayneChrist

When a window is dragged across screens with different resolutions, no notification is fired when observing device-pixel-content-box. To improve this, use matchMedia API to watch for resolution changes.

matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`)
.addEventListener('change', schedule);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv4Add to version 4 of the library

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions