Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

cache getBoundingClientRect() #3

@leeoniya

Description

@leeoniya

getBoundingClientRect() is really expensive to call on every mousemove. i think caching it and simply incrementing the x/y offsets by the mouse position should be possible while the overlay is within bounds. a custom invalidation function can be added to support cases when the overlay content changes and needs to re-measured.

thoughts? cc @tobyzerner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions