1
- /*! react-sortablejs v1.2.1 | (c) 2016 Cheton Wu <[email protected] > | MIT | https://github.com/cheton/react-sortable */
1
+ /*! react-sortablejs v1.3.0 | (c) 2017 Cheton Wu <[email protected] > | MIT | https://github.com/cheton/react-sortable */
2
2
( function webpackUniversalModuleDefinition ( root , factory ) {
3
3
if ( typeof exports === 'object' && typeof module === 'object' )
4
4
module . exports = factory ( require ( "react" ) , require ( "react-dom" ) , require ( "sortablejs" ) ) ;
@@ -114,11 +114,18 @@ return /******/ (function(modules) { // webpackBootstrap
114
114
115
115
var options = _extends ( { } , this . props . options ) ;
116
116
117
- [ 'onStart' , 'onEnd' , 'onAdd' , 'onSort ' , 'onUpdate ' , 'onRemove' , 'onFilter' , 'onMove' ] . forEach ( function ( name ) {
117
+ [ 'onChoose' , ' onStart', 'onEnd' , 'onAdd' , 'onUpdate ' , 'onSort ' , 'onRemove' , 'onFilter' , 'onMove' , 'onClone '] . forEach ( function ( name ) {
118
118
var eventHandler = options [ name ] ;
119
119
120
- options [ name ] = function ( evt ) {
121
- if ( name === 'onStart' ) {
120
+ options [ name ] = function ( ) {
121
+ for ( var _len2 = arguments . length , params = Array ( _len2 ) , _key2 = 0 ; _key2 < _len2 ; _key2 ++ ) {
122
+ params [ _key2 ] = arguments [ _key2 ] ;
123
+ }
124
+
125
+ var evt = params [ 0 ] ;
126
+
127
+
128
+ if ( name === 'onChoose' ) {
122
129
store . nextSibling = evt . item . nextElementSibling ;
123
130
store . activeComponent = _this2 ;
124
131
} else if ( ( name === 'onAdd' || name === 'onUpdate' ) && _this2 . props . onChange ) {
@@ -143,7 +150,10 @@ return /******/ (function(modules) { // webpackBootstrap
143
150
}
144
151
145
152
if ( evt . type === 'move' ) {
146
- var canMove = eventHandler ? eventHandler ( evt ) : true ;
153
+ var _evt = params [ 0 ] ,
154
+ originalEvent = params [ 1 ] ;
155
+
156
+ var canMove = eventHandler ? eventHandler ( _evt , originalEvent ) : true ;
147
157
return canMove ;
148
158
}
149
159
0 commit comments