From d938cd08650279f5c7894793d5fd78ec4068694c Mon Sep 17 00:00:00 2001 From: eleanor-park Date: Sun, 14 Apr 2024 14:25:29 -0400 Subject: working on radius eraser bug --- src/client/views/InkingStroke.tsx | 2 +- .../collections/collectionFreeForm/CollectionFreeFormView.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx index 764062682..7e0b2ba92 100644 --- a/src/client/views/InkingStroke.tsx +++ b/src/client/views/InkingStroke.tsx @@ -334,7 +334,7 @@ export class InkingStroke extends ViewBoxBaseComponent() impleme // const ptsXscale = (NumCast(radius) - NumCast(radius)) / (oldXrange.max - oldXrange.min || 1) || 1; // const ptsYscale = (NumCast(doc._height) - NumCast(doc.stroke_width)) / (oldYrange.max - oldYrange.min || 1) || 1; // const newPoints = func(this.DocumentView?.(), ink, ptsXscale, ptsYscale, NumCast(radius)); - const controlPointDistance = 0.552284749831 * radius; // tan(pi / 8) * radius + const controlPointDistance = 0.552284749831 * radius; // (4/3) * tan(pi / 8) * radius const points: { X: number; Y: number }[] = [ { X: inkCoords.X + radius, Y: inkCoords.Y }, // right point { X: inkCoords.X + radius, Y: inkCoords.Y - controlPointDistance }, // right's top ctrl point diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index a72b499b2..ef4ab55db 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -625,8 +625,8 @@ export class CollectionFreeFormView extends CollectionSubView