Skip to content

Commit e5ed519

Browse files
committed
rm useless early return for non-visible geo traces
1 parent 66838e9 commit e5ed519

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/traces/choropleth/plot.js

-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ plotChoropleth.plot = function(geo, choroplethData, geoLayout) {
7777

7878
gChoroplethTraces
7979
.each(function(trace) {
80-
if(trace.visible !== true) return;
81-
8280
var cdi = plotChoropleth.calcGeoJSON(trace, geo.topojson),
8381
cleanHoverLabelsFunc = makeCleanHoverLabelsFunc(geo, trace),
8482
eventDataFunc = makeEventDataFunc(trace);

src/traces/scattergeo/plot.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ plotScatterGeo.plot = function(geo, scattergeoData) {
128128
// TODO add hover - how?
129129
gScatterGeoTraces
130130
.each(function(trace) {
131-
if(!subTypes.hasLines(trace) || trace.visible !== true) return;
131+
if(!subTypes.hasLines(trace)) return;
132+
132133
d3.select(this)
133134
.append('path')
134135
.datum(makeLineGeoJSON(trace))
@@ -142,10 +143,7 @@ plotScatterGeo.plot = function(geo, scattergeoData) {
142143
showMarkers = subTypes.hasMarkers(trace),
143144
showText = subTypes.hasText(trace);
144145

145-
if((!showMarkers && !showText) || trace.visible !== true) {
146-
s.remove();
147-
return;
148-
}
146+
if((!showMarkers && !showText)) return;
149147

150148
var cdi = plotScatterGeo.calcGeoJSON(trace, geo.topojson),
151149
cleanHoverLabelsFunc = makeCleanHoverLabelsFunc(geo, trace),

0 commit comments

Comments
 (0)