diff options
| author | Eric <ericmabr@gmail.com> | 2023-03-15 17:29:33 -0400 |
|---|---|---|
| committer | Eric <ericmabr@gmail.com> | 2023-03-15 17:29:33 -0400 |
| commit | 06980bb5fa9f72ad20896be132bcc29e9ae4617e (patch) | |
| tree | e98357191b26b14bd17b3f8d4656b6789022e1cd /src/client/views/InkTangentHandles.tsx | |
| parent | c50fc16a161379b20eed04794d1433499b1483c7 (diff) | |
| parent | 20c0190e820f2bd343693368b7ef55a91f19c880 (diff) | |
Merge branch 'master' into UI_Update_Eric_Ma
Diffstat (limited to 'src/client/views/InkTangentHandles.tsx')
| -rw-r--r-- | src/client/views/InkTangentHandles.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/InkTangentHandles.tsx b/src/client/views/InkTangentHandles.tsx index c4a2f603e..71e0ff63c 100644 --- a/src/client/views/InkTangentHandles.tsx +++ b/src/client/views/InkTangentHandles.tsx @@ -38,18 +38,19 @@ export class InkTangentHandles extends React.Component<InkHandlesProps> { setupMoveUpEvents( this, e, - (e: PointerEvent, down: number[], delta: number[]) => { + action((e: PointerEvent, down: number[], delta: number[]) => { if (!this.props.inkView.controlUndo) this.props.inkView.controlUndo = UndoManager.StartBatch('DocDecs move tangent'); if (e.altKey) this.onBreakTangent(controlIndex); const inkMoveEnd = this.props.inkView.ptFromScreen({ X: delta[0], Y: delta[1] }); const inkMoveStart = this.props.inkView.ptFromScreen({ X: 0, Y: 0 }); InkStrokeProperties.Instance.moveTangentHandle(this.docView, -(inkMoveEnd.X - inkMoveStart.X), -(inkMoveEnd.Y - inkMoveStart.Y), handleIndex, oppositeHandleIndex, controlIndex); return false; - }, - () => { + }), + action(() => { this.props.inkView.controlUndo?.end(); + this.props.inkView.controlUndo = undefined; UndoManager.FilterBatches(['data', 'x', 'y', 'width', 'height']); - }, + }), emptyFunction ); }; |
