From 9f606f934321b43061691c890b41ed2fcdea54e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=BD=C3=A1ra?= Date: Tue, 2 Nov 2021 08:23:41 +0100 Subject: [PATCH] proper tree sweep constant, fixes #143 --- my-mind.js | 2 +- src/layout/tree.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/my-mind.js b/my-mind.js index 16445cd..ab0acfb 100644 --- a/my-mind.js +++ b/my-mind.js @@ -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]; diff --git a/src/layout/tree.ts b/src/layout/tree.ts index e065a33..4eb07ba 100644 --- a/src/layout/tree.ts +++ b/src/layout/tree.ts @@ -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;