Skip to content

DragOverlay cursor offset #122

Description

@el-dav

Hi, first of all thanks for a great library. I was hoping someone could point me in the right direction.

I'm looking at a situation using DragOverlay where the Overlay is a different size to the draggable as seen in this codesandbox: https://codesandbox.io/s/damp-smoke-wnu7y?file=/src/App.js

When you begin dragging the DragOverlay's initial position is the top-left of the original draggable element which means it's offset from the cursor position.

I would like the DragOverlay's initial position to be under the cursor.

Is this something which would be done with a listener or modifier? I couldn't see the cursor position in the available data so I wasn't sure of the recommended way to achieve this.

Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions