Skip to content

Commit

Permalink
Merge pull request #15 from antvis/indented_dropCap
Browse files Browse the repository at this point in the history
Indented drop cap
  • Loading branch information
Yanyan-Wang authored Aug 24, 2020
2 parents 77a8840 + 688dd8a commit 9d8af54
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/hierarchy",
"version": "0.6.5",
"version": "0.6.6",
"description": "layout algorithms for visualizing hierarchical data",
"main": "build/hierarchy.js",
"browser": "build/hierarchy.js",
Expand Down
2 changes: 1 addition & 1 deletion src/layout/hierarchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ util.assign(Node.prototype, {
let current;
while (current = nodes.shift()) {
callback(current);
nodes = nodes.concat(current.children);
nodes = current.children.concat(nodes);
}
},

Expand Down
2 changes: 1 addition & 1 deletion src/layout/indented.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function positionNode(node, previousNode, dx, dropCap) {
if (!dropCap) {
try {
if (node.id === node.parent.children[node.parent.children.length - 1].id) {
if (node.id === node.parent.children[0].id) {
node.x += dx * node.depth;
node.y = previousNode ? previousNode.y : 0;
return;
Expand Down

0 comments on commit 9d8af54

Please sign in to comment.