From 2382c4d27387af83ddef448c5402ceaa2e37f447 Mon Sep 17 00:00:00 2001 From: nniclas Date: Fri, 30 Aug 2019 12:54:30 +0200 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: Shivam Mishra --- .eslintrc.json | 4 ++-- src/js/utils/animate.js | 4 ++-- src/js/utils/draw-utils.js | 4 ++-- src/js/utils/draw.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index bd82cc32..1a67d2bc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,7 +14,7 @@ ], "linebreak-style": [ "error", - "windows" + "unix" ], "semi": [ "error", @@ -30,4 +30,4 @@ "globals": { "ENV": true } -} \ No newline at end of file +} diff --git a/src/js/utils/animate.js b/src/js/utils/animate.js index fd1d8c0b..b9d2e2d1 100644 --- a/src/js/utils/animate.js +++ b/src/js/utils/animate.js @@ -1,4 +1,4 @@ -import { getBarHeightAndYAttr, createSplineCurve } from './draw-utils'; +import { getBarHeightAndYAttr, getSplineCurvePointsStr } from './draw-utils'; export const UNIT_ANIM_DUR = 350; export const PATH_ANIM_DUR = 350; @@ -102,4 +102,4 @@ export function animatePath(paths, newXList, newYList, zeroLine, spline) { export function animatePathStr(oldPath, pathStr) { return [oldPath, {d: pathStr}, UNIT_ANIM_DUR, STD_EASING]; -} \ No newline at end of file +} diff --git a/src/js/utils/draw-utils.js b/src/js/utils/draw-utils.js index e781c0de..c4a81aaa 100644 --- a/src/js/utils/draw-utils.js +++ b/src/js/utils/draw-utils.js @@ -55,7 +55,7 @@ export function shortenLargeNumber(label) { } // cubic bezier curve calculation (from example by François Romain) -export function createSplineCurve(xList, yList) { +export function getSplineCurvePointsStr(xList, yList) { let points=[]; for(let i=0;i