From 93fef07b17b7b6fca439e4b08b1f47a250a655bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chclacids=E2=80=9D?= <“1246311560@qq.com”> Date: Sat, 25 Sep 2021 23:21:36 +0800 Subject: [PATCH] fix: the cubic tangent at --- src/graphic/shape/BezierCurve.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphic/shape/BezierCurve.ts b/src/graphic/shape/BezierCurve.ts index f23058f9b..3d63af803 100644 --- a/src/graphic/shape/BezierCurve.ts +++ b/src/graphic/shape/BezierCurve.ts @@ -31,7 +31,7 @@ export class BezierCurveShape { function someVectorAt(shape: BezierCurveShape, t: number, isTangent: boolean) { const cpx2 = shape.cpx2; const cpy2 = shape.cpy2; - if (cpx2 === null || cpy2 === null) { + if (cpx2 != null || cpy2 != null) { return [ (isTangent ? cubicDerivativeAt : cubicAt)(shape.x1, shape.cpx1, shape.cpx2, shape.x2, t), (isTangent ? cubicDerivativeAt : cubicAt)(shape.y1, shape.cpy1, shape.cpy2, shape.y2, t)