Skip to content

Commit 12b0e02

Browse files
monferaetpinard
authored andcommitted
moving check more upstream
1 parent ea9880e commit 12b0e02

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/plots/cartesian/select.js

+1-8
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,7 +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;
82-
if(!trace._module || !trace._module.selectPoints) continue;
77+
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
8378

8479
if(dragOptions.subplot) {
8580
if(
@@ -195,7 +190,6 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
195190
selection = [];
196191
for(i = 0; i < searchTraces.length; i++) {
197192
searchInfo = searchTraces[i];
198-
if(!visible(searchInfo)) continue;
199193
var thisSelection = fillSelectionItem(
200194
searchInfo.selectPoints(searchInfo, poly), searchInfo
201195
);
@@ -224,7 +218,6 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
224218
outlines.remove();
225219
for(i = 0; i < searchTraces.length; i++) {
226220
searchInfo = searchTraces[i];
227-
if(!visible(searchInfo)) continue;
228221
searchInfo.selectPoints(searchInfo, false);
229222
}
230223

0 commit comments

Comments
 (0)