File tree 2 files changed +14
-3
lines changed
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) {
993
993
var moduleCalcDataVisible = Lib . filterVisible ( moduleCalcData ) ;
994
994
var _module = moduleCalcData [ 0 ] [ 0 ] . trace . _module ;
995
995
var polarLayoutNow = gd . _fullLayout [ _this . id ] ;
996
+ var isGL = Registry . traceIs ( k , 'gl' ) ;
997
+
998
+ if ( isGL && _this . _scene ) _this . _scene . clear ( ) ;
996
999
997
- if ( _this . _scene ) _this . _scene . clear ( ) ;
998
1000
_module . plot ( gd , _this , moduleCalcDataVisible , polarLayoutNow ) ;
999
1001
1000
- if ( ! Registry . traceIs ( k , 'gl' ) ) {
1002
+ if ( ! isGL ) {
1001
1003
for ( var i = 0 ; i < moduleCalcDataVisible . length ; i ++ ) {
1002
1004
_module . style ( gd , moduleCalcDataVisible [ i ] ) ;
1003
1005
}
Original file line number Diff line number Diff line change @@ -1122,6 +1122,13 @@ describe('Test polar interactions:', function() {
1122
1122
patch : function ( fig ) {
1123
1123
fig . data . forEach ( function ( trace ) { trace . mode = 'markers+lines' ; } ) ;
1124
1124
}
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
+ }
1125
1132
} ] ;
1126
1133
1127
1134
specs . forEach ( function ( s ) {
@@ -1136,7 +1143,9 @@ describe('Test polar interactions:', function() {
1136
1143
fig . layout . margin = { l : 50 , t : 50 , b : 50 , r : 50 } ;
1137
1144
1138
1145
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 ) ;
1140
1149
1141
1150
Plotly . newPlot ( gd , fig ) . then ( function ( ) {
1142
1151
scene = gd . _fullLayout . polar . _subplot . _scene ;
You can’t perform that action at this time.
0 commit comments