Skip to content

Commit

Permalink
Merge pull request #295 from rehnarama/iss258
Browse files Browse the repository at this point in the history
Fixes iss258
  • Loading branch information
oliviertassinari authored May 22, 2017
2 parents b2e3c2a + 7489e45 commit 556369f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/react-swipeable-views/src/SwipeableViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,14 @@ let nodeHowClaimedTheScroll = null;
export function findNativeHandler(params) {
const {
domTreeShapes,
indexCurrent,
index,
pageX,
startX,
axis,
} = params;

return domTreeShapes.some((shape) => {
// Determine if we are going backward or forward.
let goingForward = index <= indexCurrent;
let goingForward = pageX >= startX;
if (axis === 'x' || axis === 'y') {
goingForward = !goingForward;
}
Expand Down Expand Up @@ -608,8 +608,8 @@ class SwipeableViews extends Component {
const domTreeShapes = getDomTreeShapes(event.target, this.rootNode);
const hasFoundNativeHandler = findNativeHandler({
domTreeShapes,
indexCurrent: this.state.indexCurrent,
index,
startX: this.startX,
pageX: touch.pageX,
axis,
});

Expand Down

0 comments on commit 556369f

Please sign in to comment.