Skip to content

Commit

Permalink
Merge pull request #68 from unipept/fix/node-fill-color
Browse files Browse the repository at this point in the history
Fix color issue for Treeview
  • Loading branch information
pverscha authored Apr 29, 2021
2 parents 4f18409 + def8e81 commit 0540f96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dist/unipept-visualizations.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/visualizations/treeview/Treeview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export default class Treeview {
// Animate the fill and stroke of each circle (these circles make up the nodes that are rendered).
nodeUpdate.select("circle")
.attr("r", (d: HPN<TreeviewNode>) => this.computeNodeSize(d))
.style("fill-opacity", (d: HPN<TreeviewNode>) => d.data.isCollapsed() ? 1 : 0)
.style("fill-opacity", (d: HPN<TreeviewNode>) => d.children && d.children[0].data.isCollapsed() ? 1 : 0)
.style("stroke", (d: HPN<TreeviewNode>) => this.settings.nodeStrokeColor(d.data))
.style("fill", (d: HPN<TreeviewNode>) => this.settings.nodeFillColor(d.data));

Expand Down

0 comments on commit 0540f96

Please sign in to comment.