Skip to content

Commit e757114

Browse files
committed
moving check more upstream
1 parent b9817ad commit e757114

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/plots/cartesian/select.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ var MINSELECT = constants.MINSELECT;
2323

2424
function getAxId(ax) { return ax._id; }
2525

26-
function visible(searchInfo) {
27-
var cd0 = searchInfo.cd[0];
28-
return cd0 && cd0.trace && cd0.trace.visible === true;
29-
}
30-
3126
module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
3227
var zoomLayer = dragOptions.gd._fullLayout._zoomlayer,
3328
dragBBox = dragOptions.element.getBoundingClientRect(),
@@ -79,6 +74,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
7974
for(i = 0; i < gd.calcdata.length; i++) {
8075
cd = gd.calcdata[i];
8176
trace = cd[0].trace;
77+
if(trace.visible !== true) continue;
8278
if(!trace._module || !trace._module.selectPoints) continue;
8379

8480
if(dragOptions.subplot) {
@@ -195,7 +191,6 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
195191
selection = [];
196192
for(i = 0; i < searchTraces.length; i++) {
197193
searchInfo = searchTraces[i];
198-
if(!visible(searchInfo)) continue;
199194
var thisSelection = fillSelectionItem(
200195
searchInfo.selectPoints(searchInfo, poly), searchInfo
201196
);
@@ -224,7 +219,6 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
224219
outlines.remove();
225220
for(i = 0; i < searchTraces.length; i++) {
226221
searchInfo = searchTraces[i];
227-
if(!visible(searchInfo)) continue;
228222
searchInfo.selectPoints(searchInfo, false);
229223
}
230224

0 commit comments

Comments
 (0)