Skip to content

Commit

Permalink
proper tree sweep constant, fixes #143
Browse files Browse the repository at this point in the history
  • Loading branch information
ondras committed Nov 2, 2021
1 parent 76c8fa9 commit 9f606f9
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 9f606f9

Please sign in to comment.