react-native-maps icon indicating copy to clipboard operation
react-native-maps copied to clipboard

Animated View example : how to unblock the view when it has been "opened"

Open ghamaide opened this issue 10 years ago • 5 comments

I'm starting in RN and I've been trying to mess a bit with your Animated example. The example works well but when the red view is brought up, it cannot be closed anymore. How would you work this out ?

giphy

ghamaide avatar Jan 29 '16 08:01 ghamaide

@ghamaide i'm sorry, but what do you mean by "closed"? the example is built to only pan in the x direction when the red panels are all down. Also, keep in mind this is just an example and not a "production-ready" idea...

lelandrichardson avatar Jan 29 '16 17:01 lelandrichardson

It would be awesome to have that as a separated component

lopezjurip avatar Jan 29 '16 22:01 lopezjurip

A year later, but I just encountered this in the Animated example myself.

This fix for me was to replace the line

const topOfMainWindow = ITEM_PREVIEW_HEIGHT + panY.__getValue();

with

const topOfMainWindow = ITEM_PREVIEW_HEIGHT - panY.__getValue();

in both the onMoveShouldSetPanResponder and onStartShouldSetPanResponder methods.

cinkster avatar Jan 13 '17 04:01 cinkster

@cinkster

Thank you so much, do you have any idea how to make it so that we can still scroll content in the view and not overlap with the closing event ?

Also, do you have any idea how to make it stop scaling so that the content within the box is visible ? Greetings

klaussa avatar Jun 11 '17 13:06 klaussa

This seems too old. Trying to clean the repo. Create a new issue if persists

alvelig avatar Dec 16 '17 03:12 alvelig