diff options
| author | eleanor-park <eleanor_park@brown.edu> | 2024-04-14 14:25:29 -0400 |
|---|---|---|
| committer | eleanor-park <eleanor_park@brown.edu> | 2024-04-14 14:25:29 -0400 |
| commit | d938cd08650279f5c7894793d5fd78ec4068694c (patch) | |
| tree | 6c1f483435b2736c44f0a9a77566e7e8373064b1 /src/client/views/collections | |
| parent | 3bba8465a3d823596e7f8cfab24b9afa9c05cf2c (diff) | |
working on radius eraser bug
Diffstat (limited to 'src/client/views/collections')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
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<Partial<collection setupMoveUpEvents(this, e, this.onEraserMove, this.onEraserUp, emptyFunction); break; case InkTool.RadiusEraser: - // this._batch = UndoManager.StartBatch('collectionErase'); - // setupMoveUpEvents(this, e, this.onEraserMove, this.onEraserUp, emptyFunction); + this._batch = UndoManager.StartBatch('collectionErase'); + setupMoveUpEvents(this, e, this.onEraserMove, this.onEraserUp, emptyFunction); break; case InkTool.None: if (!(this._props.layoutEngine?.() || StrCast(this.layoutDoc._layoutEngine))) { @@ -847,11 +847,11 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection const segments: Segment[] = []; var segment1: Segment = []; var segment2: Segment = []; - const eraseWidth = ActiveInkWidth(); + const eraseRadius = ActiveInkWidth() / 2; const inkStroke = ink?.ComponentView as InkingStroke; const { inkData } = (inkStroke).inkScaledData(); - const eraserInkData = inkStroke.splitByEraser(inkCoords, eraseWidth); + const eraserInkData = inkStroke.splitByEraser(inkCoords, eraseRadius); const tVals: number[] = []; // should be the tvals of the intersections |
