Skip to content

Commit c8e9c2c

Browse files
committed
fix isCartesian checks in select.js
1 parent d4b64f7 commit c8e9c2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/selections/select.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function hasSubplot(dragOptions) {
5656
}
5757

5858
function prepSelect(evt, startX, startY, dragOptions, mode) {
59-
var isCartesian = hasSubplot(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-
!isCartesian; // 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();
@@ -152,7 +152,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
152152

153153
if(immediateSelect && !evt.shiftKey) {
154154
dragOptions._clearSubplotSelections = function() {
155-
if(isCartesian) return;
155+
if(!isCartesian) return;
156156

157157
var xRef = xAxis._id;
158158
var yRef = yAxis._id;

0 commit comments

Comments
 (0)