Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
fix: corrected calculation of added/changed/removed counts in toHiera…
Browse files Browse the repository at this point in the history
…rchy

fixes #262
  • Loading branch information
rashley-iqt committed Mar 19, 2019
1 parent 53df394 commit a029c2c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CRviz",
"version": "0.3.1-alpha2",
"version": "0.3.1-alpha3",
"private": true,
"dependencies": {
"@fortawesome/fontawesome": "^1.1.3",
Expand Down
4 changes: 2 additions & 2 deletions src/features/visualization/d3-viz/setup-annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ const setupAnnotations = ({packedData, annotationRoot, colorMap}) =>{
.classed(className("total-container"), true);;
const newCircles = newTotalContainer
.append('g')
.classed(className("leafNode"), true)
.classed(className("node"), true)
.append('circle')
.attr('r', offsetIncrement)

annotations
.select(`g.${className("total-container")}`)
.select(`g.${className("leafNode")}`)
.select(`g.${className("node")}`)
.select('circle')
.merge(newCircles)
.attr('cx', (d) => ((d.r + 2*offsetIncrement) * Math.cos(baseAngle + totalAngleOffset*getAngleOfLeafNodeDiameter(d.r, offsetIncrement))))
Expand Down
4 changes: 2 additions & 2 deletions src/features/visualization/d3-viz/to-hierarchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const countChanged = (children) => {
result += (children[c].CRVIZ._changedCount || 0) + (children[c].CRVIZ._isChanged || 0) +
(
!isNil(children[c].values)
? countAdded(children[c].values) : 0
? countChanged(children[c].values) : 0
);
}

Expand All @@ -109,7 +109,7 @@ const countRemoved = (children) => {
result += (children[c].CRVIZ._removedCount || 0) + (children[c].CRVIZ._isRemoved || 0) +
(
!isNil(children[c].values)
? countAdded(children[c].values) : 0
? countRemoved(children[c].values) : 0
);
}

Expand Down

0 comments on commit a029c2c

Please sign in to comment.