diff options
| author | bobzel <zzzman@gmail.com> | 2022-05-02 18:38:03 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-05-02 18:38:03 -0400 |
| commit | a969d0212c69844cbbe82b24f124a496145a1d9b (patch) | |
| tree | 9c4d563da1be74df59ca7605b12b18dbfce9fb5e /src/client/views/InkStrokeProperties.ts | |
| parent | a2df645d2ffe83be24c20997c26eaf7257e847c0 (diff) | |
disallowed dragging a control point past another control point.
Diffstat (limited to 'src/client/views/InkStrokeProperties.ts')
| -rw-r--r-- | src/client/views/InkStrokeProperties.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/views/InkStrokeProperties.ts b/src/client/views/InkStrokeProperties.ts index 922f309d7..0449da483 100644 --- a/src/client/views/InkStrokeProperties.ts +++ b/src/client/views/InkStrokeProperties.ts @@ -238,6 +238,7 @@ export class InkStrokeProperties { const start = this._currentPoint === 0 ? 0 : this._currentPoint - 4; const splicedPoints = origInk.slice(start, start + (this._currentPoint === 0 || this._currentPoint === ink.length - 1 ? 4 : 8)); const { nearestT, nearestSeg } = InkStrokeProperties.nearestPtToStroke(splicedPoints, cpt); + if ((nearestSeg === 0 && nearestT < 1e-1) || (nearestSeg === 4 && (1 - nearestT) < 1e-1)) return ink.slice(); const samplesLeft: Point[] = []; const samplesRight: Point[] = []; var startDir = { x: 0, y: 0 }; |
