diff options
author | bobzel <zzzman@gmail.com> | 2022-05-13 21:28:11 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-05-13 21:28:11 -0400 |
commit | 970e57ab7b9ea50b21dceb1778ada1c1994eca8c (patch) | |
tree | 374180535e2489a08a0a10ad4c05e38bb612e4b6 /src | |
parent | 21ea42b425946d54eb8a811e10734e714c0164a0 (diff) |
fixed erasing overtop of closed curves. fixed outlining of non-closed strokes.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/InkingStroke.tsx | 4 | ||||
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 1 |
2 files changed, 3 insertions, 2 deletions
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<FieldViewProps>() { }} {...(!closed ? interactions : {})} > - {inkLine} - {clickableLine(this.onPointerDown)} + {closed ? inkLine : clickableLine(this.onPointerDown)} + {closed ? clickableLine(this.onPointerDown) : inkLine} </svg> {!closed || (!RTFCast(this.rootDoc.text)?.Text && !this.props.isSelected()) ? (null) : <div className="inkStroke-text" style={{ diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index c999b3224..e76bcdc42 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -532,6 +532,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps }); onPointerDown = (e: React.PointerEvent): void => { + 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)) { |