File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2008,12 +2008,12 @@ function _relayout(gd, aobj) {
2008
2008
else flags . plot = true ;
2009
2009
}
2010
2010
else {
2011
- if ( ( fullLayout . _has ( 'gl2d ' ) || fullLayout . _has ( 'regl' ) ) &&
2011
+ if ( ( fullLayout . _has ( 'scatter-like ' ) && fullLayout . _has ( 'regl' ) ) &&
2012
2012
( ai === 'dragmode' &&
2013
2013
( vi === 'lasso' || vi === 'select' ) &&
2014
2014
! ( vOld === 'lasso' || vOld === 'select' ) )
2015
2015
) {
2016
- flags . calc = true ;
2016
+ flags . plot = true ;
2017
2017
}
2018
2018
else if ( valObject ) editTypes . update ( flags , valObject ) ;
2019
2019
else flags . calc = true ;
Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ describe('Test plot api', function() {
523
523
return gd ;
524
524
}
525
525
526
- it ( 'should trigger recalc when switching into select or lasso dragmode' , function ( ) {
526
+ it ( 'should trigger replot (but not recalc) when switching into select or lasso dragmode for scattergl traces ' , function ( ) {
527
527
var gd = mock ( {
528
528
data : [ {
529
529
type : 'scattergl' ,
@@ -541,8 +541,8 @@ describe('Test plot api', function() {
541
541
expect ( subroutines . layoutReplot ) . not . toHaveBeenCalled ( ) ;
542
542
}
543
543
544
- function expectRecalc ( ) {
545
- expect ( gd . calcdata ) . toBeUndefined ( ) ;
544
+ function expectReplot ( ) {
545
+ expect ( gd . calcdata ) . toBeDefined ( ) ;
546
546
expect ( subroutines . doModeBar ) . not . toHaveBeenCalled ( ) ;
547
547
expect ( subroutines . layoutReplot ) . toHaveBeenCalled ( ) ;
548
548
}
@@ -551,7 +551,7 @@ describe('Test plot api', function() {
551
551
expectModeBarOnly ( ) ;
552
552
553
553
Plotly . relayout ( mock ( gd ) , 'dragmode' , 'lasso' ) ;
554
- expectRecalc ( ) ;
554
+ expectReplot ( ) ;
555
555
556
556
Plotly . relayout ( mock ( gd ) , 'dragmode' , 'select' ) ;
557
557
expectModeBarOnly ( ) ;
@@ -563,7 +563,7 @@ describe('Test plot api', function() {
563
563
expectModeBarOnly ( ) ;
564
564
565
565
Plotly . relayout ( mock ( gd ) , 'dragmode' , 'select' ) ;
566
- expectRecalc ( ) ;
566
+ expectReplot ( ) ;
567
567
} ) ;
568
568
} ) ;
569
569
You can’t perform that action at this time.
0 commit comments