react-native-skia-gesture icon indicating copy to clipboard operation
react-native-skia-gesture copied to clipboard

Touchable not working with map

Open sahinboga opened this issue 10 months ago • 2 comments

Can you help me please!!!!!!!

<Touchable.Canvas style={{ width: width, height: height }}> <SkiaImage x={0} y={0} image={imageData} height={height * 0.8} width={width} fit='cover' > {apiResponse?.draw_set.map((item, index) => ( <Group key={index}> <Touchable.Rect key={index} x={item.x} y={item.y} width={item.width * 0.8} height={item.height} color={item.color} style="stroke" strokeWidth={2} {...rectGesture} /> </Group> ))} </SkiaImage> </Touchable.Canvas>

sahinboga avatar Jun 11 '25 11:06 sahinboga

Hey, I noticed you’re applying the same rectGesture to all the Touchable.Rect components. You should probably create a separate gesture handler for each one.

Please let me know if this helps 🙏

enzomanuelmangano avatar Jun 29 '25 11:06 enzomanuelmangano

Hey, I noticed you’re applying the same rectGesture to all the Touchable.Rect components. You should probably create a separate gesture handler for each one.

Please let me know if this helps 🙏

Hi, I tried what you suggested, but it didn't work. I tried a completely different method without using your package. However, I found that adding the "children" property to the dependency array would probably fix the problem.

sahinboga avatar Jul 09 '25 06:07 sahinboga