Skip to content

Bug: onStop returns wrong positions when using grid #413

Closed
@flashtheman

Description

@flashtheman

When using grid, the x and y returned by onStop are incorrect. lastX and lastY however seem to be correct. I can't find a explanation for the values onStop returns for x and y.
I've created an example showing the behavior:

https://codesandbox.io/s/texthighlights-wtrzt

Please have a look at the console output when dragging the object around. I would have expected x and y to change based on the grid of [50,50] but this is not the case.

React-draggable is also used by react-rnd - they also have an issue open for this bug (bokuweb/react-rnd#453)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions