Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

SwipeThroughStack #38

Merged
merged 3 commits into from
Mar 9, 2019
Merged

SwipeThroughStack #38

merged 3 commits into from
Mar 9, 2019

Conversation

jklingen92
Copy link
Contributor

Create a prop that allows you to swipe through the last element in the stack. Without this, it's impossible to reach the onFinish function for a stack.

Create a prop that allows you to swipe through the last element in the stack. Without this, it's impossible to reach the onFinish function for a stack.
src/Swiper.js Outdated
@@ -540,7 +542,7 @@ export default class SwiperAnimated extends PureComponent {
rotate = this.pan.x.interpolate({ inputRange: [-400, 0, 400], outputRange: ['-8deg', '0deg', '8deg'] });
translateY = this.pan.y;
translateX = this.pan.x;
panHandlers = swiper && children.length - 1 !== this.currentIndex[this.guid] ?
panHandlers = swiper && children.length - 1 !== this.currentIndex[this.guid] || swipeThroughStack ?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, could you group the conditions in brackets ()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chitezh is that better?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that makes more sense now

@chitezh chitezh merged commit 169ba57 into chitezh:master Mar 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants