Skip to content

Commit db330b9

Browse files
author
Berton Zhu
committed
fix: should get view length from the container node
1 parent a12dd90 commit db330b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-swipeable-views/src/SwipeableViews.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class SwipeableViews extends React.Component {
364364

365365
const touch = applyRotationMatrix(event.touches[0], axis);
366366

367-
this.viewLength = this.rootNode.getBoundingClientRect()[axisProperties.length[axis]];
367+
this.viewLength = this.containerNode.getBoundingClientRect()[axisProperties.length[axis]];
368368
this.startX = touch.pageX;
369369
this.lastX = touch.pageX;
370370
this.vx = 0;

0 commit comments

Comments
 (0)