Skip to content

Commit 89e94f9

Browse files
committed
return empty set for invisible bar trace -for other traces
1 parent 8d4b821 commit 89e94f9

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/traces/scatter/select.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
2626

2727
// TODO: include lines? that would require per-segment line properties
2828
var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));
29-
if(trace.visible !== true || hasOnlyLines) return;
29+
if(trace.visible !== true || hasOnlyLines) return [];
3030

3131
var opacity = Array.isArray(marker.opacity) ? 1 : marker.opacity;
3232

src/traces/scattergeo/select.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
2222
var di, lonlat, x, y, i;
2323

2424
var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));
25-
if(trace.visible !== true || hasOnlyLines) return;
25+
if(trace.visible !== true || hasOnlyLines) return [];
2626

2727
var marker = trace.marker;
2828
var opacity = Array.isArray(marker.opacity) ? 1 : marker.opacity;

src/traces/scattergl/select.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
2626
var scene = glTrace.scene;
2727

2828
var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));
29-
if(trace.visible !== true || hasOnlyLines) return;
29+
if(trace.visible !== true || hasOnlyLines) return [];
3030

3131
// filter out points by visible scatter ones
3232
if(polygon === false) {

src/traces/scattermapbox/select.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
2424
// to not insert data-driven 'circle-opacity' when we don't need to
2525
trace._hasDimmedPts = false;
2626

27-
if(trace.visible !== true || !subtypes.hasMarkers(trace)) return;
27+
if(trace.visible !== true || !subtypes.hasMarkers(trace)) return [];
2828

2929
if(polygon === false) {
3030
for(i = 0; i < cd.length; i++) {

0 commit comments

Comments
 (0)