@@ -50,13 +50,13 @@ var p2r = helpers.p2r;
50
50
var axValue = helpers . axValue ;
51
51
var getTransform = helpers . getTransform ;
52
52
53
- function cartesianDrag ( dragOptions ) {
53
+ function hasSubplot ( dragOptions ) {
54
54
// N.B. subplot may be falsy e.g zero sankey index!
55
55
return dragOptions . subplot !== undefined ;
56
56
}
57
57
58
58
function prepSelect ( evt , startX , startY , dragOptions , mode ) {
59
- var isCartesianDrag = cartesianDrag ( dragOptions ) ;
59
+ var isCartesian = hasSubplot ( dragOptions ) ;
60
60
61
61
var isFreeMode = freeMode ( mode ) ;
62
62
var isRectMode = rectMode ( mode ) ;
@@ -71,7 +71,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
71
71
var gd = dragOptions . gd ;
72
72
var fullLayout = gd . _fullLayout ;
73
73
var immediateSelect = isSelectMode && fullLayout . newselection . mode === 'immediate' &&
74
- ! isCartesianDrag ; // N.B. only cartesian subplots have persistent selection
74
+ ! isCartesian ; // N.B. only cartesian subplots have persistent selection
75
75
76
76
var zoomLayer = fullLayout . _zoomlayer ;
77
77
var dragBBox = dragOptions . element . getBoundingClientRect ( ) ;
@@ -119,7 +119,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
119
119
opacity : isDrawMode ? newStyle . opacity / 2 : 1 ,
120
120
fill : ( isDrawMode && ! isOpenMode ) ? newStyle . fillcolor : 'none' ,
121
121
stroke : newStyle . line . color || (
122
- isCartesianDrag ?
122
+ isCartesian ?
123
123
'#7f7f7f' : // non-cartesian subplot
124
124
Color . contrast ( gd . _fullLayout . plot_bgcolor ) // cartesian subplot
125
125
) ,
@@ -152,7 +152,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
152
152
153
153
if ( immediateSelect && ! evt . shiftKey ) {
154
154
dragOptions . _clearSubplotSelections = function ( ) {
155
- if ( isCartesianDrag ) return ;
155
+ if ( isCartesian ) return ;
156
156
157
157
var xRef = xAxis . _id ;
158
158
var yRef = yAxis . _id ;
@@ -718,7 +718,7 @@ function clearSelectionsCache(dragOptions, immediateSelect) {
718
718
var selections ;
719
719
if (
720
720
isSelectMode &&
721
- ! cartesianDrag ( dragOptions ) // only allow cartesian - no mapbox for now
721
+ ! hasSubplot ( dragOptions ) // only allow cartesian - no mapbox for now
722
722
) {
723
723
selections = newSelections ( outlines , dragOptions ) ;
724
724
}
@@ -758,7 +758,7 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
758
758
if ( trace . visible !== true || ! trace . _module || ! trace . _module . selectPoints ) continue ;
759
759
760
760
if (
761
- cartesianDrag ( { subplot : subplot } ) &&
761
+ hasSubplot ( { subplot : subplot } ) &&
762
762
( trace . subplot === subplot || trace . geo === subplot )
763
763
) {
764
764
searchTraces . push ( createSearchInfo ( trace . _module , cd , xAxes [ 0 ] , yAxes [ 0 ] ) ) ;
0 commit comments