Skip to content

Commit 3a064e7

Browse files
committed
drop hoverClosestGl2d from modebar
1 parent dc14847 commit 3a064e7

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

src/components/modebar/buttons.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -559,18 +559,6 @@ function handleGeo(gd, ev) {
559559
}
560560
}
561561

562-
modeBarButtons.hoverClosestGl2d = {
563-
name: 'hoverClosestGl2d',
564-
_cat: 'hoverclosest',
565-
title: function(gd) { return _(gd, 'Toggle show closest data on hover'); },
566-
attr: 'hovermode',
567-
val: null,
568-
toggle: true,
569-
icon: Icons.tooltip_basic,
570-
gravity: 'ne',
571-
click: toggleHover
572-
};
573-
574562
modeBarButtons.hoverClosestPie = {
575563
name: 'hoverClosestPie',
576564
_cat: 'hoverclosest',

src/components/modebar/manage.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ function getButtonGroups(gd) {
107107
var hasGeo = fullLayout._has('geo');
108108
var hasPie = fullLayout._has('pie');
109109
var hasFunnelarea = fullLayout._has('funnelarea');
110-
var hasGL2D = fullLayout._has('gl2d');
111110
var hasTernary = fullLayout._has('ternary');
112111
var hasMapbox = fullLayout._has('mapbox');
113112
var hasMap = fullLayout._has('map');
@@ -155,7 +154,7 @@ function getButtonGroups(gd) {
155154
var resetGroup = [];
156155
var dragModeGroup = [];
157156

158-
if((hasCartesian || hasGL2D || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasMap + hasPolar + hasSmith > 1) {
157+
if((hasCartesian || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasMap + hasPolar + hasSmith > 1) {
159158
// graphs with more than one plot types get 'union buttons'
160159
// which reset the view or toggle hover labels across all subplots.
161160
hoverGroup = ['toggleHover'];
@@ -175,8 +174,6 @@ function getButtonGroups(gd) {
175174
zoomGroup = ['zoomInMap', 'zoomOutMap'];
176175
hoverGroup = ['toggleHover'];
177176
resetGroup = ['resetViewMap'];
178-
} else if(hasGL2D) {
179-
hoverGroup = ['hoverClosestGl2d'];
180177
} else if(hasPie) {
181178
hoverGroup = ['hoverClosestPie'];
182179
} else if(hasSankey) {
@@ -196,14 +193,14 @@ function getButtonGroups(gd) {
196193
hoverGroup = [];
197194
}
198195

199-
if((hasCartesian || hasGL2D) && !allAxesFixed) {
196+
if(hasCartesian && !allAxesFixed) {
200197
zoomGroup = ['zoomIn2d', 'zoomOut2d', 'autoScale2d'];
201198
if(resetGroup[0] !== 'resetViews') resetGroup = ['resetScale2d'];
202199
}
203200

204201
if(hasGL3D) {
205202
dragModeGroup = ['zoom3d', 'pan3d', 'orbitRotation', 'tableRotation'];
206-
} else if(((hasCartesian || hasGL2D) && !allAxesFixed) || hasTernary) {
203+
} else if((hasCartesian && !allAxesFixed) || hasTernary) {
207204
dragModeGroup = ['zoom2d', 'pan2d'];
208205
} else if(hasMapbox || hasMap || hasGeo) {
209206
dragModeGroup = ['pan2d'];
@@ -248,14 +245,12 @@ function getButtonGroups(gd) {
248245
enableHover('hoverClosestCartesian');
249246
enableHover('hoverClosestGeo');
250247
enableHover('hoverClosest3d');
251-
enableHover('hoverClosestGl2d');
252248
enableHover('hoverClosestPie');
253249
} else if(b === 'v1hovermode') {
254250
enableHover('hoverClosestCartesian');
255251
enableHover('hoverCompareCartesian');
256252
enableHover('hoverClosestGeo');
257253
enableHover('hoverClosest3d');
258-
enableHover('hoverClosestGl2d');
259254
enableHover('hoverClosestPie');
260255
}
261256
} else newList.push(b);

0 commit comments

Comments
 (0)