Skip to content

Commit 0c2ed26

Browse files
authored
Merge pull request #114 from avertin/avertin/onDragEnd
Call onDragEnd after changePosition
2 parents a75aced + 77d82f6 commit 0c2ed26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/AutoDragSortableView.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,6 @@ export default class AutoDragSortableView extends Component{
405405
this.setState({
406406
scrollEnabled: true
407407
})
408-
if (this.props.onDragEnd) {
409-
this.props.onDragEnd(this.touchCurItem.index,this.touchCurItem.moveToIndex)
410-
}
411408
//this.state.dataSource[this.touchCurItem.index].scaleValue.setValue(1)
412409
Animated.timing(
413410
this.state.dataSource[this.touchCurItem.index].scaleValue,
@@ -424,6 +421,9 @@ export default class AutoDragSortableView extends Component{
424421
}
425422
})
426423
this.changePosition(this.touchCurItem.index,this.touchCurItem.moveToIndex)
424+
if (this.props.onDragEnd) {
425+
this.props.onDragEnd(this.touchCurItem.index,this.touchCurItem.moveToIndex)
426+
}
427427
this.touchCurItem = null
428428
}
429429
})

0 commit comments

Comments
 (0)