lint:
- Add parentheses in bezier-math.ts ternary conditions - Add parentheses in editor.ts align calculation expression
This commit is contained in:
parent
0ff5a87ccb
commit
cbae1eaccf
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue