Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mixPath unable to handle different data lengths #466

Open
ksinghj opened this issue Aug 30, 2021 · 2 comments
Open

mixPath unable to handle different data lengths #466

ksinghj opened this issue Aug 30, 2021 · 2 comments

Comments

@ksinghj
Copy link

ksinghj commented Aug 30, 2021

Editing the Rainbow (season 4) graph in Can it be done in React Native? series and this error is thrown when 2 different data lengths are passed to mixPath:

Screenshot 2021-08-30 at 14 51 39

const previous = useSharedValue<GraphIndex>(0)
  const current = useSharedValue<GraphIndex>(0)

  const animatedProps = useAnimatedProps(() => {
    const previousPath = graphs[previous.value].data.path
    const currentPath = graphs[current.value].data.path
    return {
      d: mixPath(transition.value, previousPath, currentPath),
    }
  })

if previousPathand currentPath have different lengths, the error is thrown!

@tony-schumacher
Copy link

Same issue for me.

@tony-schumacher
Copy link

Proposal: https://github.com/wcandillon/react-native-redash/pull/482/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants