aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/InteractionUtils.tsx
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-06-23 21:59:26 -0700
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-06-23 21:59:26 -0700
commit627f4e582fe3a18d1c971b7e3850605e662afb7a (patch)
tree086666db799d6d3d61befa248735423bebb71adf /src/client/util/InteractionUtils.tsx
parentb989082c3502e8ad5ca3a89a8459e6ac72e38ccc (diff)
parent527dce9247d06705d089ea75a81638d5c486cd7e (diff)
Merge branch 'mobile_revision_direct' of https://github.com/browngraphicslab/Dash-Web into mobile_revision_direct
Diffstat (limited to 'src/client/util/InteractionUtils.tsx')
-rw-r--r--src/client/util/InteractionUtils.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/InteractionUtils.tsx b/src/client/util/InteractionUtils.tsx
index 3b42fcaee..7bdf631fc 100644
--- a/src/client/util/InteractionUtils.tsx
+++ b/src/client/util/InteractionUtils.tsx
@@ -100,9 +100,9 @@ export namespace InteractionUtils {
const newPoints = points.reduce((p, pts) => { p.push([pts.X, pts.Y]); return p; }, [] as number[][]);
newPoints.pop();
const bezierCurves = fitCurve(newPoints, parseInt(bezier));
- for (var i = 0; i < bezierCurves.length; i++) {
+ for (const curve of bezierCurves) {
for (var t = 0; t < 1; t += 0.01) {
- const point = beziercurve(t, bezierCurves[i]);
+ const point = beziercurve(t, curve);
pts.push({ X: point[0], Y: point[1] });
}
}