- Add parentheses in bezier-math.ts ternary conditions
- Add parentheses in editor.ts align calculation expression
This commit is contained in:
Ilya Nikitin 2026-03-27 21:38:27 +05:00
parent 0ff5a87ccb
commit cbae1eaccf
3 changed files with 2763 additions and 5 deletions

2758
bun.lock Normal file

File diff suppressed because it is too large Load diff

View file

@ -522,12 +522,12 @@ function solveMergedTangents(
const inner = { x: b1 * toRA.x + b2 * toRB.x, y: b1 * toRA.y + b2 * toRB.y }
const c =
Math.abs(inner.x) > Math.abs(inner.y)
? inner.x !== 0
? (inner.x !== 0
? rhs.x / inner.x
: 1
: inner.y !== 0
: 1)
: (inner.y !== 0
? rhs.y / inner.y
: 1
: 1)
return {
tangentStart: { x: c * toRA.x, y: c * toRA.y },
tangentEnd: { x: c * toRB.x, y: c * toRB.y }

View file

@ -790,7 +790,7 @@ export function createEditorStore(initialGraph?: SceneGraph) {
if (v > hi) hi = v
}
const target = align === 'min' ? lo : align === 'max' ? hi : (lo + hi) / 2
const target = align === 'min' ? lo : (align === 'max' ? hi : (lo + hi) / 2)
for (const i of indices) {
es.vertices[i] = { ...es.vertices[i], [prop]: target }
}