File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -993,11 +993,13 @@ proto.updateRadialDrag = function(fullLayout, polarLayout) {
993993 var moduleCalcDataVisible = Lib . filterVisible ( moduleCalcData ) ;
994994 var _module = moduleCalcData [ 0 ] [ 0 ] . trace . _module ;
995995 var polarLayoutNow = gd . _fullLayout [ _this . id ] ;
996+ var isGL = Registry . traceIs ( k , 'gl' ) ;
997+
998+ if ( isGL && _this . _scene ) _this . _scene . clear ( ) ;
996999
997- if ( _this . _scene ) _this . _scene . clear ( ) ;
9981000 _module . plot ( gd , _this , moduleCalcDataVisible , polarLayoutNow ) ;
9991001
1000- if ( ! Registry . traceIs ( k , 'gl' ) ) {
1002+ if ( ! isGL ) {
10011003 for ( var i = 0 ; i < moduleCalcDataVisible . length ; i ++ ) {
10021004 _module . style ( gd , moduleCalcDataVisible [ i ] ) ;
10031005 }
Original file line number Diff line number Diff line change @@ -1122,6 +1122,13 @@ describe('Test polar interactions:', function() {
11221122 patch : function ( fig ) {
11231123 fig . data . forEach ( function ( trace ) { trace . mode = 'markers+lines' ; } ) ;
11241124 }
1125+ } , {
1126+ desc : 'gl and non-gl on same subplot case' ,
1127+ patch : function ( fig ) {
1128+ fig . data . forEach ( function ( trace , i ) {
1129+ trace . type = ( i % 2 ) ? 'scatterpolar' : 'scatterpolargl' ;
1130+ } ) ;
1131+ }
11251132 } ] ;
11261133
11271134 specs . forEach ( function ( s ) {
@@ -1136,7 +1143,9 @@ describe('Test polar interactions:', function() {
11361143 fig . layout . margin = { l : 50 , t : 50 , b : 50 , r : 50 } ;
11371144
11381145 if ( s . patch ) s . patch ( fig ) ;
1139- nTraces = fig . data . length ;
1146+ nTraces = fig . data . reduce ( function ( acc , trace ) {
1147+ return ( trace . type === 'scatterpolargl' ) ? ++ acc : acc ;
1148+ } , 0 ) ;
11401149
11411150 Plotly . newPlot ( gd , fig ) . then ( function ( ) {
11421151 scene = gd . _fullLayout . polar . _subplot . _scene ;
You can’t perform that action at this time.
0 commit comments