Skip to content

Commit

Permalink
Merge pull request #73 from ondras/master
Browse files Browse the repository at this point in the history
proper tree sweep constant, fixes #143
  • Loading branch information
ondras authored Nov 2, 2021
2 parents dbe698e + 9f606f9 commit 4ff3c7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion my-mind.js
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@
lastChild.resolvedShape.getVerticalAnchor(lastChild) + lastChild.position[1] - R2
];
let d = [`M ${pointAnchor}`, `L ${lineEnd}`];
let sweep = dirModifier > 1 ? 1 : 0;
let sweep = dirModifier > 0 ? 0 : 1;
children.forEach((child) => {
const { resolvedShape: resolvedShape2, position } = child;
const y = resolvedShape2.getVerticalAnchor(child) + position[1];
Expand Down
2 changes: 1 addition & 1 deletion src/layout/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class TreeLayout extends Layout {
];
let d = [`M ${pointAnchor}`, `L ${lineEnd}`];

let sweep = (dirModifier > 1 ? 1 : 0);
let sweep = (dirModifier > 0 ? 0 : 1);

children.forEach(child => {
const { resolvedShape, position } = child;
Expand Down

0 comments on commit 4ff3c7d

Please sign in to comment.