-
Notifications
You must be signed in to change notification settings - Fork 652
Conversation
Added a manual open that follows the current architecture for close. By setting openRight or openLeft, componentWillReceiveProps will call the corresponding function and open the menu appropriately.
The gesture eventing was not setup correctly such that touchables could still get events inside of the swipeable view. Using the view’s Capture functions instead of the PanResponder dosn’t give as much info so those props were removed and moved to the PanResponders create method. onStartShouldSetPanResponderCapture did not seem necessary. onMoveShouldSetPanResponder seemed to never be called and its logic was moved to onMoveShouldSetPanResponderCapture that IS called when a touchable is pressed/gestured inside the swipable view such that sensitivity can be taken into account.
The _openLeft function set tweenContent based on the right buttons.
Attempting to fix state problem with removing Promises from openRight and openLeft and instead using the setState callback to call the tweenContent and set the final state. Currently the issue is that if an open button is used to open the swipe menu, the swipe state is now tied together with other swipe menus on swipe.
onClose and onOpen were only being called on swipe. This ensures that they are called in all cases.
@alburdette619 Thanks for your PR. Please resolve conflicts |
…wipeout # Conflicts: # index.js
Sorry it took me so long to get back to you on this. It should be good to merge in if you're happy with the way I merged it all. |
This sounds very interesting as I would like to do this on my screen to suggest to users there are swipe controls. @silentcloud are you happy with this. Is there an example of how this works once merged? |
@alburdette619 any progress? |
I am also interested in getting this functionality. |
I'm also interested in this functionality +1 Thanks @alburdette619! @silentcloud any update? |
This PR is still a little problem, please consider |
@alburdette619 @silentcloud I'd like to use this as well to open the right and left via onPress or long press, anyway we can get it finished? |
@silentcloud can you add the ability to open the swipeout manually if you're not happy with this approach? |
@lyndsey-ferguson Ok, I will approve this PR, If someone has problems using |
version 2.2.0 |
@silentcloud maybe add some info to README? |
This PR includes functions following the close prop architecture to open the right and left menus programmatically. In order for this to work the PanResponder handling had to be worked on such that inside views could still have touch events. The wrong pan methods were being used for the sensitivity to work. Also, onClose and onOpen were only called on a pan so they were moved such that they are called in
_close()
and_openRight/Left
.