Giter Site home page Giter Site logo

Comments (13)

alantoa avatar alantoa commented on May 23, 2024 1

just fixed thumbIndex.value === 0; to thumbIndex.value = 0;, and released to v2.1.2, thanks found it.
also disableTrackFollow still needs to check.

from react-native-awesome-slider.

alantoa avatar alantoa commented on May 23, 2024 1

https://github.com/alantoa/react-native-awesome-slider/pull/27/files
just created a PR, I think should fix both issues.
and released v2.1.3.

from react-native-awesome-slider.

efstathiosntonas avatar efstathiosntonas commented on May 23, 2024 1

Just tested it, it works as it should. Thanks @alantoa, good work!

from react-native-awesome-slider.

efstathiosntonas avatar efstathiosntonas commented on May 23, 2024

disableTrackFollow prop is the culprit. Trying to figure what is causing it.

from react-native-awesome-slider.

alantoa avatar alantoa commented on May 23, 2024

hey, @efstathiosntonas, its a bit repetitive during the swipe, so I remove thumb logic.
this is before video, maybe need to do adjust for this.

Simulator.Screen.Recording.-.iPhone.13.-.2022-09-23.at.16.53.29.mp4

from react-native-awesome-slider.

efstathiosntonas avatar efstathiosntonas commented on May 23, 2024

After going through the entire diff between 2.0.8 and 2.1.1 I realised that you're using ref only on the bubble so discard the intro on the initial comment. Something is causing the thumb to not move if disableTrackFollow is enabled. Looking into it now.

from react-native-awesome-slider.

alantoa avatar alantoa commented on May 23, 2024

just check it, make sense!
maybe we just make the disableTrackFollow change to Animated.SharedValue, and turn it when isScrubbing=true.

from react-native-awesome-slider.

alantoa avatar alantoa commented on May 23, 2024

we don't need it when isScrubbing = false.

from react-native-awesome-slider.

alantoa avatar alantoa commented on May 23, 2024

also, add you to manage of this lib, feel free to change it.

from react-native-awesome-slider.

efstathiosntonas avatar efstathiosntonas commented on May 23, 2024

Thanks for adding me as a collaborator. This useAnimatedReaction is causing the issue, at 2.0.8 the calculations where different.

edit: link:

useAnimatedReaction(

from react-native-awesome-slider.

efstathiosntonas avatar efstathiosntonas commented on May 23, 2024

This entire function is missing from 2.1.1

  // setting thumbValue
  useAnimatedReaction(
    () => {
      if (isScrubbing && isScrubbing.value) {
        return undefined;
      }
      if (step) {
        return undefined;
      }
      const currentValue =
        (progress.value / (minimumValue.value + maximumValue.value)) *
        (width.value - (disableTrackFollow ? thumbWidth : 0));
      return clamp(currentValue, 0, width.value - thumbWidth);
    },
    data => {
      if (data !== undefined) {
        thumbValue.value = data;
      }
    },
    [thumbWidth, maximumValue, minimumValue, step, progress, width],
  );

when i added it back it worked as it should 🤔

from react-native-awesome-slider.

alantoa avatar alantoa commented on May 23, 2024

yeah, I didn't know you needed this before.
now I know you add isScrubbing prop to work this, but I'm not sure other people will add isScrubbing prop, I hope this component is simple to use.
so I think need an isScrubbingInner value to use the inner component, that's prefect!

from react-native-awesome-slider.

efstathiosntonas avatar efstathiosntonas commented on May 23, 2024

It won't work if I remove the isScrubbing prop and enable the disableTrackFollow prop. Am I missing something on the "config"?

Just to be sure we're on the same page, this is how I'm using it:

Screen.Recording.2022-09-23.at.12.29.29.mov

from react-native-awesome-slider.

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.