Skip to content

Commit

Permalink
Merge pull request #413 from stanislawosinski/tooltip-hiding
Browse files Browse the repository at this point in the history
Hide tooltip when hovering over the attribution group and between top level groups.
  • Loading branch information
th0r committed Jan 20, 2021
2 parents ba2bf40 + 36d2ff8 commit 9ade716
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -12,7 +12,9 @@ _Note: Gaps between patch versions are faulty, broken or test releases._

## UNRELEASED

<!-- Add changelog entries for new changes under this section -->
* **Bug Fix**
* Don't show an empty tooltip when hovering over the FoamTree attribution group or between top-level groups ([#413](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/413) by [@
stanislawosinski](https://github.com/stanislawosinski))

## 4.3.0

Expand Down
7 changes: 5 additions & 2 deletions client/components/Treemap.jsx
Expand Up @@ -105,9 +105,12 @@ export default class Treemap extends Component {
},
onGroupDoubleClick: preventDefault,
onGroupHover(event) {
// Ignoring hovering on `FoamTree` branding group
if (event.group && event.group.attribution) {
// Ignoring hovering on `FoamTree` branding group and the root group
if (event.group && (event.group.attribution || event.group === this.get('dataObject'))) {
event.preventDefault();
if (props.onMouseLeave) {
props.onMouseLeave.call(component, event);
}
return;
}

Expand Down

0 comments on commit 9ade716

Please sign in to comment.