Skip to content

Commit b461dc1

Browse files
committed
rm (now useless) Geo.updateFx method
- now that choropleth hover geos through Fx.hover, `hovermode: false` for geo no longer needs a special handler.
1 parent 8c29dfb commit b461dc1

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

src/plot_api/subroutines.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,6 @@ exports.doModeBar = function(gd) {
306306
// no need to do this for gl2d subplots,
307307
// Plots.linkSubplots takes care of it all.
308308

309-
subplotIds = Plots.getSubplotIds(fullLayout, 'geo');
310-
for(i = 0; i < subplotIds.length; i++) {
311-
var geo = fullLayout[subplotIds[i]]._subplot;
312-
geo.updateFx(fullLayout.hovermode);
313-
}
314-
315309
return Plots.previousPromises(gd);
316310
};
317311

src/plots/geo/geo.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var topojsonFeature = require('topojson-client').feature;
3232
addProjectionsToD3(d3);
3333

3434

35-
function Geo(options, fullLayout) {
35+
function Geo(options) {
3636
this.id = options.id;
3737
this.graphDiv = options.graphDiv;
3838
this.container = options.container;
@@ -51,9 +51,7 @@ function Geo(options, fullLayout) {
5151
this.zoom = null;
5252
this.zoomReset = null;
5353

54-
5554
this.makeFramework();
56-
this.updateFx(fullLayout.hovermode);
5755

5856
this.traceHash = {};
5957
}
@@ -173,15 +171,6 @@ proto.onceTopojsonIsLoaded = function(geoCalcData, geoLayout) {
173171
this.render();
174172
};
175173

176-
proto.updateFx = function(hovermode) {
177-
this.showHover = (hovermode !== false);
178-
179-
// TODO should more strict, any layout.hovermode other
180-
// then false will make all geo subplot display hover text.
181-
// Instead each geo should have its own geo.hovermode
182-
// to control hover visibility independently of other subplots.
183-
};
184-
185174
proto.makeProjection = function(geoLayout) {
186175
var projLayout = geoLayout.projection,
187176
projType = projLayout.type,

src/plots/geo/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ exports.plot = function plotGeo(gd) {
5454
graphDiv: gd,
5555
container: fullLayout._geolayer.node(),
5656
topojsonURL: gd._context.topojsonURL
57-
},
58-
fullLayout
59-
);
57+
});
6058

6159
fullLayout[geoId]._subplot = geo;
6260
}

0 commit comments

Comments
 (0)