Skip to content

calculatePointerPosition should respect zoom level on iPhone #84

Description

@ColemanGariety

calculatePointerPosition does not take into account the zoom level. So previews are offset on iPhone, if the user is zoomed in. The function should detect the zoom level and adjust the coordinates appropriately.

Activity

  1. LouisBrunner commented on Aug 31, 2022

    @LouisBrunner
    Owner

    Hi @JacksonGariety,

    I can't seem to reproduce it with different zoom level on any device, are you using the ref prop of the Preview component?
    https://github.com/LouisBrunner/dnd-multi-backend/tree/main/packages/react-dnd-preview#usage--example

  2. ColemanGariety commented on Oct 10, 2022

    @ColemanGariety
    Author

    @LouisBrunner I am not using the ref property. I'll try it and see if that fixes it.

    The bug is visible on the mobile version of this web app: https://www.neverendingchartrendering.org/

    Steps to repro:

    1. Search for an album ("Abbey Road")
    2. Pinch to zoom in
    3. Begin dragging the Abbey Road album cover
    4. Note that more you zoom in, the more offset the preview is.

    UPDATE: I added the ref property but it didn't affect the position of the preview at all.

  3. LouisBrunner commented on Dec 10, 2022

    @LouisBrunner
    Owner

    Hey @JacksonGariety,

    I tried it but couldn't reproduce it. Did you find a find an alternative way to get it working? Can you show me an example of how you use the ref property?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions