@@ -292,8 +292,10 @@ phaseSlider = function(game) {
292
292
_customHandleNext : options . customHandleNext || "" ,
293
293
_customHandlePrev : options . customHandlePrev || "" ,
294
294
_showHandles : options . showHandles == undefined ? true : options . showHandles ,
295
- _onNextCallback : options . onNextCallback || false ,
296
- _onPrevCallback : options . onPrevCallback || false ,
295
+ _onPreNextCallback : options . onPreNextCallback || false ,
296
+ _onPrePrevCallback : options . onPrePrevCallback || false ,
297
+ _onAfterNextCallback : options . onAfterNextCallback || false ,
298
+ _onAfterPrevCallback : options . onAfterPreCallback || false ,
297
299
_addModal : options . modal || false ,
298
300
_modalAlpha : options . modalAlpha || 0.7 ,
299
301
_staticElements : options . staticElements || [ ]
@@ -402,14 +404,18 @@ phaseSlider = function(game) {
402
404
chevronRight . y = ( _this . options . _height / 2 ) - chevronRight . height / 2 ;
403
405
chevronRight . inputEnabled = true ;
404
406
chevronRight . events . onInputDown . add ( function ( e , pointer ) {
405
- if ( _this . options . _onNextCallback ) {
406
- _this . options . _onNextCallback ( ) ;
407
+ if ( _this . options . _onPreNextCallback ) {
408
+ _this . options . _onPreNextCallback ( ) ;
407
409
}
408
410
409
411
if ( _this . tweenObj . isRunning !== true ) {
410
412
_this . stopSlider ( ) ;
411
413
_this . goToNext ( ) ;
412
414
}
415
+
416
+ if ( _this . options . _onAfterNextCallback ) {
417
+ _this . options . _onAfterNextCallback ( ) ;
418
+ }
413
419
414
420
} , _this ) ;
415
421
@@ -424,14 +430,18 @@ phaseSlider = function(game) {
424
430
chevronLeft . y = ( _this . options . _height / 2 ) - chevronLeft . height / 2 ;
425
431
chevronLeft . inputEnabled = true ;
426
432
chevronLeft . events . onInputDown . add ( function ( e , pointer ) {
427
- if ( _this . options . _onPrevCallback ) {
428
- _this . options . _onPrevCallback ( ) ;
433
+ if ( _this . options . _onPrePrevCallback ) {
434
+ _this . options . _onPrePrevCallback ( ) ;
429
435
}
430
436
431
437
if ( _this . tweenObj . isRunning !== true ) {
432
438
_this . stopSlider ( ) ;
433
439
_this . goToPrev ( ) ;
434
440
}
441
+
442
+ if ( _this . options . _onAfterPrevCallback ) {
443
+ _this . options . _onAfterPrevCallback ( ) ;
444
+ }
435
445
436
446
} , _this ) ;
437
447
0 commit comments