File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 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) {
20082008 else flags . plot = true ;
20092009 }
20102010 else {
2011- if ( ( fullLayout . _has ( 'gl2d ' ) || fullLayout . _has ( 'regl' ) ) &&
2011+ if ( ( fullLayout . _has ( 'scatter-like ' ) && fullLayout . _has ( 'regl' ) ) &&
20122012 ( ai === 'dragmode' &&
20132013 ( vi === 'lasso' || vi === 'select' ) &&
20142014 ! ( vOld === 'lasso' || vOld === 'select' ) )
20152015 ) {
2016- flags . calc = true ;
2016+ flags . plot = true ;
20172017 }
20182018 else if ( valObject ) editTypes . update ( flags , valObject ) ;
20192019 else flags . calc = true ;
Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ describe('Test plot api', function() {
523523 return gd ;
524524 }
525525
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 ( ) {
527527 var gd = mock ( {
528528 data : [ {
529529 type : 'scattergl' ,
@@ -541,8 +541,8 @@ describe('Test plot api', function() {
541541 expect ( subroutines . layoutReplot ) . not . toHaveBeenCalled ( ) ;
542542 }
543543
544- function expectRecalc ( ) {
545- expect ( gd . calcdata ) . toBeUndefined ( ) ;
544+ function expectReplot ( ) {
545+ expect ( gd . calcdata ) . toBeDefined ( ) ;
546546 expect ( subroutines . doModeBar ) . not . toHaveBeenCalled ( ) ;
547547 expect ( subroutines . layoutReplot ) . toHaveBeenCalled ( ) ;
548548 }
@@ -551,7 +551,7 @@ describe('Test plot api', function() {
551551 expectModeBarOnly ( ) ;
552552
553553 Plotly . relayout ( mock ( gd ) , 'dragmode' , 'lasso' ) ;
554- expectRecalc ( ) ;
554+ expectReplot ( ) ;
555555
556556 Plotly . relayout ( mock ( gd ) , 'dragmode' , 'select' ) ;
557557 expectModeBarOnly ( ) ;
@@ -563,7 +563,7 @@ describe('Test plot api', function() {
563563 expectModeBarOnly ( ) ;
564564
565565 Plotly . relayout ( mock ( gd ) , 'dragmode' , 'select' ) ;
566- expectRecalc ( ) ;
566+ expectReplot ( ) ;
567567 } ) ;
568568 } ) ;
569569
You can’t perform that action at this time.
0 commit comments