File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ module.exports = _react2.default.createClass({
338338 // Note: if touch very very quickly and continuous,
339339 // the variation of `index` more than 1.
340340 // parseInt() ensures it's always an integer
341- index = parseInt ( index + diff / step ) ;
341+ index = parseInt ( index + Math . round ( diff / step ) ) ;
342342
343343 if ( this . props . loop ) {
344344 if ( index <= - 1 ) {
Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ module.exports = React.createClass({
296296 let { offset, index } = this . state
297297 let previousOffset = horizontal ? offset . x : offset . y
298298 let newOffset = horizontal ? contentOffset . x : contentOffset . y
299-
299+
300300 if ( previousOffset === newOffset && ( index === 0 || index === children . length - 1 ) ) {
301301 this . setState ( {
302302 isScrolling : false
@@ -322,7 +322,7 @@ module.exports = React.createClass({
322322 // Note: if touch very very quickly and continuous,
323323 // the variation of `index` more than 1.
324324 // parseInt() ensures it's always an integer
325- index = parseInt ( index + diff / step )
325+ index = parseInt ( index + Math . round ( diff / step ) )
326326
327327 if ( this . props . loop ) {
328328 if ( index <= - 1 ) {
You can’t perform that action at this time.
0 commit comments