From c2ee6c32a499fc20ee43e81232ef6a89ffc011e2 Mon Sep 17 00:00:00 2001 From: Mark Tolmacs Date: Tue, 7 Apr 2026 17:43:27 +0200 Subject: [PATCH] fix: Approximate start bump reset Signed-off-by: Mark Tolmacs --- packages/element/src/renderElement.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/element/src/renderElement.ts b/packages/element/src/renderElement.ts index 1824138ae3..2ee3cb4999 100644 --- a/packages/element/src/renderElement.ts +++ b/packages/element/src/renderElement.ts @@ -645,8 +645,8 @@ const drawFreeDrawSegments = ( const p1 = points[i]; // Very first pressure values are often unreliable, // so for the first couple of segments use a radius - const r0 = i < 2 ? 0 : baseRadius * getPressure(i - 1) * 2; - const r1 = baseRadius * getPressure(i) * 2; + const r0 = i <= 2 ? 0 : baseRadius * getPressure(i - 1) * 2; + const r1 = i < 2 ? 0 : baseRadius * getPressure(i) * 2; // Catmull-Rom tangents. At the last real point, use predictedPoint as // the look-ahead so the tip curves smoothly toward the expected position. @@ -678,7 +678,7 @@ const drawFreeDrawSegments = ( // the next real pointer event arrives. if (predictedPoint !== undefined && N >= 1) { const lastPt = points[N - 1]; - const r0 = baseRadius * getPressure(N - 1) * 2; + const r0 = N <= 2 ? 0 : baseRadius * getPressure(N - 1) * 2; // Tangent at the last real point (with predicted look-ahead) const t0 = getCatmullRomTangent(points, N - 1, predictedPoint);