From 970e57ab7b9ea50b21dceb1778ada1c1994eca8c Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 13 May 2022 21:28:11 -0400 Subject: fixed erasing overtop of closed curves. fixed outlining of non-closed strokes. --- src/client/views/InkingStroke.tsx | 4 ++-- src/client/views/nodes/DocumentView.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx index d0f01c363..f97b713dd 100644 --- a/src/client/views/InkingStroke.tsx +++ b/src/client/views/InkingStroke.tsx @@ -359,8 +359,8 @@ export class InkingStroke extends ViewBoxBaseComponent() { }} {...(!closed ? interactions : {})} > - {inkLine} - {clickableLine(this.onPointerDown)} + {closed ? inkLine : clickableLine(this.onPointerDown)} + {closed ? clickableLine(this.onPointerDown) : inkLine} {!closed || (!RTFCast(this.rootDoc.text)?.Text && !this.props.isSelected()) ? (null) :
{ + if (this.rootDoc.type === DocumentType.INK && CurrentUserUtils.SelectedTool === InkTool.Eraser) return; // continue if the event hasn't been canceled AND we are using a mouse or this has an onClick or onDragStart function (meaning it is a button document) if (!(InteractionUtils.IsType(e, InteractionUtils.MOUSETYPE) || [InkTool.Highlighter, InkTool.Pen].includes(CurrentUserUtils.SelectedTool))) { if (!InteractionUtils.IsType(e, InteractionUtils.PENTYPE)) { -- cgit v1.2.3-70-g09d2