diff options
| author | bobzel <zzzman@gmail.com> | 2024-01-18 15:05:53 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-01-18 15:05:53 -0500 |
| commit | 5b5730a7df073659cbb6c326f748f7fcbe6625e8 (patch) | |
| tree | 4eed039040d17c87f5b5ef8562b33389e1cca165 /src/client/views/InkTangentHandles.tsx | |
| parent | 73e13094c0a1b1fb391f2e44abeaffd01ff59c74 (diff) | |
lots of changes to try to simplify API for viewPaths and related
Diffstat (limited to 'src/client/views/InkTangentHandles.tsx')
| -rw-r--r-- | src/client/views/InkTangentHandles.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/InkTangentHandles.tsx b/src/client/views/InkTangentHandles.tsx index a00c26a07..c20399698 100644 --- a/src/client/views/InkTangentHandles.tsx +++ b/src/client/views/InkTangentHandles.tsx @@ -23,7 +23,7 @@ export interface InkHandlesProps { @observer export class InkTangentHandles extends React.Component<InkHandlesProps> { get docView() { - return this.props.inkView.props.docViewPath().lastElement(); + return this.props.inkView.DocumentView?.(); } /** * Handles the movement of a selected handle point when the user clicks and drags. @@ -42,7 +42,7 @@ export class InkTangentHandles extends React.Component<InkHandlesProps> { 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); + this.docView && InkStrokeProperties.Instance.moveTangentHandle(this.docView, -(inkMoveEnd.X - inkMoveStart.X), -(inkMoveEnd.Y - inkMoveStart.Y), handleIndex, oppositeHandleIndex, controlIndex); return false; }), action(() => { |
