Code Monkey home page Code Monkey logo

Comments (2)

jakst avatar jakst commented on June 2, 2024 1

I can't reproduce the wrong item being dragged though. Logically that shouldn't be possible because the draggable id is captured at time of click.

I think I might have confused myself when writing that. Sorry! I did not mean that the wrong item gets tracked, but rather that the visual effect of the delay gives you the feeling that you are dragging on the last item you passed, instead of the the first one. So in my example it feels like you are dragging Draggable 1 instead of Draggable 3, even though Draggable 3 is still the one under the cursor in the end of course. This is probably because the placeholder for Draggable 3 is moved to Draggable 1's position before the timeout has run out.

Setting an additional check for drag distance sounds like a promising fix to this issue to me!

from solid-dnd.

martinpengellyphillips avatar martinpengellyphillips commented on June 2, 2024

Thanks for the report!

I can reproduce the jumping behaviour.

The delay is currently hardcoded in the pointer sensor at 250ms, which felt a sensible value to avoid confusion with typical clicks.

We can make that configurable, but I think we'd also need to introduce a move distance check to address this properly. E.g. Wait 250ms OR for move of 10+pixels to start drag.

I can't reproduce the wrong item being dragged though. Logically that shouldn't be possible because the draggable id is captured at time of click.

from solid-dnd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.