@@ -385,14 +385,11 @@ function setActive(gd, sliderGroup, sliderOpts, index, doCallback, doTransition)
385
385
if ( ! _step . method ) return ;
386
386
387
387
sliderOpts . _invokingCommand = true ;
388
- Plotly [ _step . method ] ( gd , args [ 0 ] , args [ 1 ] , args [ 2 ] ) . then ( function ( ) {
388
+
389
+ Plots . executeAPICommand ( gd , _step . method , _step . args ) . then ( function ( ) {
389
390
sliderOpts . _invokingCommand = false ;
390
- } , function ( ) {
391
+ } , function ( ) {
391
392
sliderOpts . _invokingCommand = false ;
392
-
393
- // This is not a disaster. Some methods like `animate` reject if interrupted
394
- // and *should* nicely log a warning.
395
- Lib . warn ( 'Warning: Plotly.' + _step . method + ' was called and rejected.' ) ;
396
393
} ) ;
397
394
398
395
sliderGroup . _nextMethod = null ;
@@ -477,8 +474,12 @@ function setGripPosition(sliderGroup, sliderOpts, position, doTransition) {
477
474
478
475
var x = normalizedValueToPosition ( sliderOpts , position ) ;
479
476
477
+ // If this is true, then *this component* is already invoking its own command
478
+ // and has triggered its own animation.
479
+ if ( sliderOpts . _invokingCommand ) return ;
480
+
480
481
var el = grip ;
481
- if ( doTransition && sliderOpts . transition . duration > 0 && ! sliderOpts . _invokingCommand ) {
482
+ if ( doTransition && sliderOpts . transition . duration > 0 ) {
482
483
el = el . transition ( )
483
484
. duration ( sliderOpts . transition . duration )
484
485
. ease ( sliderOpts . transition . easing ) ;
0 commit comments