Skip to content

Commit

Permalink
unified hoverlabel: remove modebar hover buttons when activated
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinerg committed Mar 13, 2020
1 parent 05188d6 commit af4a07c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/modebar/manage.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function getButtonGroups(gd) {
var hasPolar = fullLayout._has('polar');
var hasSankey = fullLayout._has('sankey');
var allAxesFixed = areAllAxesFixed(fullLayout);
var hasUnifiedHoverLabel = ['x unified', 'y unified'].indexOf(fullLayout.hovermode) !== -1;

var groups = [];

Expand Down Expand Up @@ -146,7 +147,7 @@ function getButtonGroups(gd) {
if(hasCartesian) {
hoverGroup = ['toggleSpikelines', 'hoverClosestCartesian', 'hoverCompareCartesian'];
}
if(hasNoHover(fullData)) {
if(hasNoHover(fullData) || hasUnifiedHoverLabel) {
hoverGroup = [];
}

Expand Down

0 comments on commit af4a07c

Please sign in to comment.