File tree 4 files changed +9
-13
lines changed 4 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -893,9 +893,7 @@ function selectPoints(searchInfo, selectionTester) {
893
893
return selection ;
894
894
}
895
895
896
- function style ( gd , cds ) {
897
- if ( ! cds ) return ;
898
-
896
+ function styleOnSelect ( gd , cds ) {
899
897
var stash = cds [ 0 ] [ 0 ] . t ;
900
898
var scene = stash . _scene ;
901
899
@@ -957,7 +955,7 @@ module.exports = {
957
955
calc : calc ,
958
956
plot : plot ,
959
957
hoverPoints : hoverPoints ,
960
- style : style ,
958
+ styleOnSelect : styleOnSelect ,
961
959
selectPoints : selectPoints ,
962
960
963
961
sceneOptions : sceneOptions ,
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ module.exports = {
183
183
calc : calc ,
184
184
plot : plot ,
185
185
hoverPoints : hoverPoints ,
186
- style : ScatterGl . style ,
186
+ styleOnSelect : ScatterGl . styleOnSelect ,
187
187
selectPoints : ScatterGl . selectPoints ,
188
188
189
189
meta : {
Original file line number Diff line number Diff line change @@ -424,9 +424,7 @@ function selectPoints(searchInfo, selectionTester) {
424
424
return selection ;
425
425
}
426
426
427
- function style ( gd , cds ) {
428
- if ( ! cds ) return ;
429
-
427
+ function styleOnSelect ( gd , cds ) {
430
428
var fullLayout = gd . _fullLayout ;
431
429
var cd0 = cds [ 0 ] ;
432
430
var scene0 = fullLayout . _splomScenes [ cd0 [ 0 ] . trace . uid ] ;
@@ -479,7 +477,7 @@ module.exports = {
479
477
plot : plot ,
480
478
hoverPoints : hoverPoints ,
481
479
selectPoints : selectPoints ,
482
- style : style ,
480
+ styleOnSelect : styleOnSelect ,
483
481
484
482
meta : {
485
483
description : [
Original file line number Diff line number Diff line change @@ -1087,20 +1087,20 @@ describe('Test splom select:', function() {
1087
1087
1088
1088
Plotly . newPlot ( gd , fig ) . then ( function ( ) {
1089
1089
// 'scattergl' trace module
1090
- spyOn ( gd . _fullLayout . _modules [ 0 ] , 'style ' ) . and . callFake ( function ( ) {
1090
+ spyOn ( gd . _fullLayout . _modules [ 0 ] , 'styleOnSelect ' ) . and . callFake ( function ( ) {
1091
1091
cnt ++ ;
1092
1092
scatterGlCnt = cnt ;
1093
1093
} ) ;
1094
1094
// 'splom' trace module
1095
- spyOn ( gd . _fullLayout . _modules [ 1 ] , 'style ' ) . and . callFake ( function ( ) {
1095
+ spyOn ( gd . _fullLayout . _modules [ 1 ] , 'styleOnSelect ' ) . and . callFake ( function ( ) {
1096
1096
cnt ++ ;
1097
1097
splomCnt = cnt ;
1098
1098
} ) ;
1099
1099
} )
1100
1100
. then ( function ( ) { return _select ( [ [ 20 , 395 ] , [ 195 , 205 ] ] ) ; } )
1101
1101
. then ( function ( ) {
1102
- expect ( gd . _fullLayout . _modules [ 0 ] . style ) . toHaveBeenCalledTimes ( 1 ) ;
1103
- expect ( gd . _fullLayout . _modules [ 1 ] . style ) . toHaveBeenCalledTimes ( 1 ) ;
1102
+ expect ( gd . _fullLayout . _modules [ 0 ] . styleOnSelect ) . toHaveBeenCalledTimes ( 1 ) ;
1103
+ expect ( gd . _fullLayout . _modules [ 1 ] . styleOnSelect ) . toHaveBeenCalledTimes ( 1 ) ;
1104
1104
1105
1105
expect ( cnt ) . toBe ( 2 ) ;
1106
1106
expect ( splomCnt ) . toBe ( 1 , 'splom redraw before scattergl' ) ;
You can’t perform that action at this time.
0 commit comments