Coder Social home page Coder Social logo

Direction is wrong about use-gesture HOT 6 CLOSED

pmndrs avatar pmndrs commented on August 25, 2024
Direction is wrong

from use-gesture.

Comments (6)

dbismut avatar dbismut commented on August 25, 2024 1

Haha fair enough. Well if you use this lib again with hooks and stumble upon the same problem let me know!

from use-gesture.

drcmda avatar drcmda commented on August 25, 2024

its probably b/c it calculates velocity and direction from one frame to to another. A small debounce or something like that would likely fix it. can only acknowledge it at this point since i'm super busy atm. Unless you want to submit a PR? That would be the greatest.

from use-gesture.

dbismut avatar dbismut commented on August 25, 2024

@arvigeus we've just released a beta of v5.0.0 ([email protected]) that might correct your problem.

However, there's quite a few api changes that are mentioned here, dropping render-props and relying solely on hooks might affect you I'm afraid.

const bind = useGesture({ onDrag: () => {} }, {...config})

from use-gesture.

arvigeus avatar arvigeus commented on August 25, 2024

In order to test it I have to rewrite my code. Since I am the only one complaining about it, I'll just close the issue.

from use-gesture.

dbismut avatar dbismut commented on August 25, 2024

If you have a codesandbox with the old code I'd be happy to migrate it to hooks to see if it's solved.

from use-gesture.

arvigeus avatar arvigeus commented on August 25, 2024

Thank you for your kindness! The code is too convoluted. Unless you hate life and free time, I think I'll spare you "the pleasure".

from use-gesture.

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.