layout alg fixes

This commit is contained in:
Jan Prochazka
2022-01-20 09:39:01 +01:00
parent e99a6a189f
commit 2303cf1611
2 changed files with 35 additions and 14 deletions

View File

@@ -148,7 +148,7 @@ export function solveOverlapsInIntervalArray(position: number, size: number, use
if (interval[1] < position) {
candidates.push(interval[1] - size / 2);
} else if (interval[0] > position) {
candidates.push(interval[0] - size / 2);
candidates.push(interval[0] + size / 2);
} else {
// position is in interval
let candidate = position;