From a969d0212c69844cbbe82b24f124a496145a1d9b Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 2 May 2022 18:38:03 -0400 Subject: disallowed dragging a control point past another control point. --- src/client/views/InkStrokeProperties.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/client/views/InkStrokeProperties.ts') 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 }; -- cgit v1.2.3-70-g09d2