NWACus / avy

Mobile-Native Viewing of NAC Avalanche Forecasts
MIT License
13 stars 7 forks source link

Issue 747: Stop pin from moving on map pans #794

Closed kevinherdez closed 2 months ago

kevinherdez commented 2 months ago

This fixes the issue in #747 where the pin moved every time a user panned or zoomed in on the map. This was because no matter what the user did while interacting with the map, it would file an onPress that would then update the pin location.

This fix replaces <Pressable> and the onPress with a <View> and PanResponder. The PanResponder keeps tracks of movements the user does on the View which are then used to determine if the user tapped the view or did a different gesture.

PanFix

yuliadub commented 2 months ago

/preview

github-actions[bot] commented 2 months ago

Preview in Expo Go

iOS Android
qrcode qrcode
exp://u.expo.dev/update/2ce36b7a-6c27-4a5b-9a77-78ab55b6b802 exp://u.expo.dev/update/82df71b2-7717-4402-a638-802506965a97
github-actions[bot] commented 2 months ago

expo_preview: succeeded ✅ https://github.com/NWACus/avy/actions/runs/11056714589

yuliadub commented 2 months ago

@kevinherdez looks good to me! I'm gonna merge this - sound good to you?

stevekuznetsov commented 2 months ago

Thank you! Looks great.