Skip to content

Commit af4a07c

Browse files
committed
unified hoverlabel: remove modebar hover buttons when activated
1 parent 05188d6 commit af4a07c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/modebar/manage.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ function getButtonGroups(gd) {
8585
var hasPolar = fullLayout._has('polar');
8686
var hasSankey = fullLayout._has('sankey');
8787
var allAxesFixed = areAllAxesFixed(fullLayout);
88+
var hasUnifiedHoverLabel = ['x unified', 'y unified'].indexOf(fullLayout.hovermode) !== -1;
8889

8990
var groups = [];
9091

@@ -146,7 +147,7 @@ function getButtonGroups(gd) {
146147
if(hasCartesian) {
147148
hoverGroup = ['toggleSpikelines', 'hoverClosestCartesian', 'hoverCompareCartesian'];
148149
}
149-
if(hasNoHover(fullData)) {
150+
if(hasNoHover(fullData) || hasUnifiedHoverLabel) {
150151
hoverGroup = [];
151152
}
152153

0 commit comments

Comments
 (0)