@@ -1124,8 +1124,14 @@ return /******/ (function(modules) { // webpackBootstrap
1124
1124
// getCSS function needs previously set state
1125
1125
1126
1126
if ( this . props . onInitTargetLeft ) {
1127
- targetLeft = this . props . onInitTargetLeft ( targetLeft , slideCount , slideWidth , trackWidth ) ;
1127
+ console . warn ( '[onInitTargetLeft] deprecated from version 0.14.8. Use onTransformInitTargetLeft instead' ) ;
1128
+ targetLeft = this . props . onInitTargetLeft ( { targetLeft : targetLeft , slideCount : slideCount , slideWidth : slideWidth , trackWidth : trackWidth , listWidth : listWidth , listHeight : listHeight } ) ;
1128
1129
}
1130
+
1131
+ if ( this . props . onTransformInitTargetLeft ) {
1132
+ targetLeft = this . props . onTransformInitTargetLeft ( { targetLeft : targetLeft , slideCount : slideCount , slideWidth : slideWidth , trackWidth : trackWidth , listWidth : listWidth , listHeight : listHeight } ) ;
1133
+ }
1134
+
1129
1135
var trackStyle = ( 0 , _trackHelper . getTrackCSS ) ( ( 0 , _objectAssign2 . default ) ( { left : targetLeft } , props , this . state ) ) ;
1130
1136
1131
1137
this . setState ( { trackStyle : trackStyle } ) ;
@@ -1167,6 +1173,11 @@ return /******/ (function(modules) { // webpackBootstrap
1167
1173
slideIndex : this . state . currentSlide ,
1168
1174
trackRef : this . track
1169
1175
} , props , this . state ) ) ;
1176
+
1177
+ if ( this . props . onTransformUpdateTargetLeft ) {
1178
+ targetLeft = this . props . onTransformUpdateTargetLeft ( { targetLeft : targetLeft , slideCount : slideCount , slideWidth : slideWidth , trackWidth : trackWidth , listWidth : listWidth , listHeight : listHeight } ) ;
1179
+ }
1180
+
1170
1181
// getCSS function needs previously set state
1171
1182
var trackStyle = ( 0 , _trackHelper . getTrackCSS ) ( ( 0 , _objectAssign2 . default ) ( { left : targetLeft } , props , this . state ) ) ;
1172
1183
@@ -1313,7 +1324,12 @@ return /******/ (function(modules) { // webpackBootstrap
1313
1324
if ( this . props . useCSS === false ) {
1314
1325
1315
1326
if ( this . props . customCurrentSlideLeft ) {
1316
- currentLeft = this . props . customCurrentSlideLeft ( currentLeft , currentSlide , targetSlide ) ;
1327
+ console . warn ( '[customCurrentSlideLeft] deprecated from version 0.14.8. Use onTransformCurrentLeft instead' ) ;
1328
+ currentLeft = this . props . customCurrentSlideLeft ( { currentLeft : currentLeft , currentSlide : currentSlide , targetLeft : targetLeft , targetSlide : targetSlide } ) ;
1329
+ }
1330
+
1331
+ if ( this . props . onTransformCurrentLeft ) {
1332
+ currentLeft = this . props . onTransformCurrentLeft ( { currentLeft : currentLeft , currentSlide : currentSlide , targetLeft : targetLeft , targetSlide : targetSlide } ) ;
1317
1333
}
1318
1334
1319
1335
this . setState ( {
@@ -1327,7 +1343,12 @@ return /******/ (function(modules) { // webpackBootstrap
1327
1343
} else {
1328
1344
1329
1345
if ( this . props . customCurrentSlideLeft ) {
1330
- currentLeft = this . props . customCurrentSlideLeft ( currentLeft , currentSlide , targetSlide ) ;
1346
+ console . warn ( '[customCurrentSlideLeft] deprecated from version 0.14.8. Use onTransformCurrentLeft instead' ) ;
1347
+ currentLeft = this . props . customCurrentSlideLeft ( { currentLeft : currentLeft , currentSlide : currentSlide , targetLeft : targetLeft , targetSlide : targetSlide } ) ;
1348
+ }
1349
+
1350
+ if ( this . props . onTransformCurrentLeft ) {
1351
+ currentLeft = this . props . onTransformCurrentLeft ( { currentLeft : currentLeft , currentSlide : currentSlide , targetLeft : targetLeft , targetSlide : targetSlide } ) ;
1331
1352
}
1332
1353
1333
1354
var nextStateChanges = {
@@ -1346,7 +1367,12 @@ return /******/ (function(modules) { // webpackBootstrap
1346
1367
} ;
1347
1368
1348
1369
if ( this . props . customTargetSlideLeft ) {
1349
- targetLeft = this . props . customTargetSlideLeft ( targetLeft , currentSlide , targetSlide ) ;
1370
+ console . warn ( '[customTargetSlideLeft] deprecated from version 0.14.8. Use onTransformTargetLeft instead' ) ;
1371
+ targetLeft = this . props . customTargetSlideLeft ( { currentLeft : currentLeft , currentSlide : currentSlide , targetLeft : targetLeft , targetSlide : targetSlide } ) ;
1372
+ }
1373
+
1374
+ if ( this . props . onTransformTargetLeft ) {
1375
+ targetLeft = this . props . onTransformTargetLeft ( { currentLeft : currentLeft , currentSlide : currentSlide , targetLeft : targetLeft , targetSlide : targetSlide } ) ;
1350
1376
}
1351
1377
1352
1378
this . setState ( {
@@ -1527,6 +1553,9 @@ return /******/ (function(modules) { // webpackBootstrap
1527
1553
customTargetSlideLeft : null ,
1528
1554
customCurrentSlideLeft : null ,
1529
1555
onInitTargetLeft : null ,
1556
+ onTransformTargetLeft : null ,
1557
+ onTransformCurrentLeft : null ,
1558
+ onTransformInitTargetLeft : null ,
1530
1559
edgeEvent : null ,
1531
1560
init : null ,
1532
1561
swipeEvent : null ,
0 commit comments