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

cannot drag AnimatedPath anymore on IOS after Expo SDK52 update (went from [email protected] to [email protected]) #2546

Open
anvarwouldnever opened this issue Nov 18, 2024 · 2 comments
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS

Comments

@anvarwouldnever
Copy link

anvarwouldnever commented Nov 18, 2024

Description

I'm mapping AnimatedPath elements inside GestureDetector expecting them to be draggable

const animatedProps = useAnimatedProps(() => ({
    transform: [
        { translateX: translateX.value },
        { translateY: translateY.value },
    ],
}));

return (
    <GestureDetector key={index} gesture={panGesture}>
            <AnimatedPath
                d={path.d}
                fill={path.fill}
                animatedProps={animatedProps}
                onResponderMove={(_) => {}}
            />
    </GestureDetector>
);

It's not working on IOS after Expo SDK 52 update, which puts [email protected] as default version of the library

Steps to reproduce

put any AnimatedPath element inside a GestureDetector and try to make it draggable, for example

const panGesture = Gesture.Pan()
    .onUpdate((event) => {
        translateX.value = event.translationX;
        translateY.value = event.translationY;
        console.log(translateX.value, translateY.value)
    });
                                    
                                    
const animatedProps = useAnimatedProps(() => ({
    transform: [
        { translateX: translateX.value },
        { translateY: translateY.value },
    ],
}));

return (
    <GestureDetector key={index} gesture={panGesture}>
            {!dragged && <AnimatedPath
                d={path.d}
                fill={path.fill}
                animatedProps={animatedProps}
                disabled={false}
            />}
    </GestureDetector>
);
@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Missing info The user didn't precise the problem enough labels Nov 18, 2024
Copy link

github-actions bot commented Nov 18, 2024

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository, SVG version, React Native version and Platforms sections.

Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Nov 18, 2024
@tjzel tjzel transferred this issue from software-mansion/react-native-reanimated Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS
Projects
None yet
Development

No branches or pull requests

1 participant