@@ -50,13 +50,13 @@ var p2r = helpers.p2r;
5050var axValue = helpers . axValue ;
5151var getTransform = helpers . getTransform ;
5252
53- function cartesianDrag ( dragOptions ) {
53+ function hasSubplot ( dragOptions ) {
5454 // N.B. subplot may be falsy e.g zero sankey index!
5555 return dragOptions . subplot !== undefined ;
5656}
5757
5858function prepSelect ( evt , startX , startY , dragOptions , mode ) {
59- var isCartesianDrag = cartesianDrag ( dragOptions ) ;
59+ var isCartesian = hasSubplot ( dragOptions ) ;
6060
6161 var isFreeMode = freeMode ( mode ) ;
6262 var isRectMode = rectMode ( mode ) ;
@@ -71,7 +71,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
7171 var gd = dragOptions . gd ;
7272 var fullLayout = gd . _fullLayout ;
7373 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
7575
7676 var zoomLayer = fullLayout . _zoomlayer ;
7777 var dragBBox = dragOptions . element . getBoundingClientRect ( ) ;
@@ -119,7 +119,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
119119 opacity : isDrawMode ? newStyle . opacity / 2 : 1 ,
120120 fill : ( isDrawMode && ! isOpenMode ) ? newStyle . fillcolor : 'none' ,
121121 stroke : newStyle . line . color || (
122- isCartesianDrag ?
122+ isCartesian ?
123123 '#7f7f7f' : // non-cartesian subplot
124124 Color . contrast ( gd . _fullLayout . plot_bgcolor ) // cartesian subplot
125125 ) ,
@@ -152,7 +152,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
152152
153153 if ( immediateSelect && ! evt . shiftKey ) {
154154 dragOptions . _clearSubplotSelections = function ( ) {
155- if ( isCartesianDrag ) return ;
155+ if ( isCartesian ) return ;
156156
157157 var xRef = xAxis . _id ;
158158 var yRef = yAxis . _id ;
@@ -718,7 +718,7 @@ function clearSelectionsCache(dragOptions, immediateSelect) {
718718 var selections ;
719719 if (
720720 isSelectMode &&
721- ! cartesianDrag ( dragOptions ) // only allow cartesian - no mapbox for now
721+ ! hasSubplot ( dragOptions ) // only allow cartesian - no mapbox for now
722722 ) {
723723 selections = newSelections ( outlines , dragOptions ) ;
724724 }
@@ -758,7 +758,7 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
758758 if ( trace . visible !== true || ! trace . _module || ! trace . _module . selectPoints ) continue ;
759759
760760 if (
761- cartesianDrag ( { subplot : subplot } ) &&
761+ hasSubplot ( { subplot : subplot } ) &&
762762 ( trace . subplot === subplot || trace . geo === subplot )
763763 ) {
764764 searchTraces . push ( createSearchInfo ( trace . _module , cd , xAxes [ 0 ] , yAxes [ 0 ] ) ) ;
0 commit comments