Skip to content

Commit b04102b

Browse files
committed
resolves #1754 - add "no-need-to-fetch-topojson" logic
1 parent 4abc139 commit b04102b

File tree

4 files changed

+4956
-1
lines changed

4 files changed

+4956
-1
lines changed

src/plots/geo/geo.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,18 @@ module.exports = function createGeo(opts) {
7272
proto.plot = function(geoCalcData, fullLayout, promises) {
7373
var _this = this;
7474
var geoLayout = fullLayout[this.id];
75+
76+
var needsTopojson = false;
77+
for(var k in constants.layerNameToAdjective) {
78+
if(k !== 'frame' && geoLayout['show' + k]) {
79+
needsTopojson = true;
80+
break;
81+
}
82+
}
83+
if(!needsTopojson) {
84+
return _this.update(geoCalcData, fullLayout);
85+
}
86+
7587
var topojsonNameNew = topojsonUtils.getTopojsonName(geoLayout);
7688

7789
if(_this.topojson === null || topojsonNameNew !== _this.topojsonName) {

test/image/baselines/geo_skymap.png

156 KB
Loading

0 commit comments

Comments
 (0)