diff options
| author | geireann <60007097+geireann@users.noreply.github.com> | 2020-06-19 15:11:30 +0800 |
|---|---|---|
| committer | geireann <60007097+geireann@users.noreply.github.com> | 2020-06-19 15:11:30 +0800 |
| commit | de2d44d173fba4c7cd7ac3ce7285215ddb5957b1 (patch) | |
| tree | cbf5479ce06fa0a51a4135968b5fc16803f2a81e /src/pen-gestures | |
| parent | 10754a14c8d0dda68f2484e523f6901b3e7daee3 (diff) | |
| parent | a19d891f386816f127ea1ee3970c6ec48adb0d74 (diff) | |
Merge branch 'mobile_revision_direct' of https://github.com/browngraphicslab/Dash-Web into mobile_revision_direct
Diffstat (limited to 'src/pen-gestures')
| -rw-r--r-- | src/pen-gestures/ndollar.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pen-gestures/ndollar.ts b/src/pen-gestures/ndollar.ts index 9d42035d1..ecd8df3e7 100644 --- a/src/pen-gestures/ndollar.ts +++ b/src/pen-gestures/ndollar.ts @@ -552,7 +552,7 @@ function Distance(p1: any, p2: any) // distance between two points } function CalcStartUnitVector(points: any, index: any) // start angle from points[0] to points[index] normalized as a unit vector { - const v = new Point(points[index].X - points[0].X, points[index].Y - points[0].Y); + const v = new Point(points[index]?.X - points[0]?.X, points[index]?.Y - points[0]?.Y); const len = Math.sqrt(v.X * v.X + v.Y * v.Y); return new Point(v.X / len, v.Y / len); } |
