Skip to content

Commit

Permalink
2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cetinkaya committed Jul 5, 2019
1 parent ac04f94 commit 2aa5d2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "embla-carousel",
"version": "2.0.3",
"version": "2.1.0",
"author": "David Cetinkaya",
"private": false,
"description": "An extensible low level carousel for the web, written in TypeScript",
Expand Down
4 changes: 3 additions & 1 deletion src/components/pointer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ export function Pointer(size: ChunkSize): Pointer {
pointer.trackPoints
.slice(-trackLength)
.map(point => currentPoint - point)
.sort((p1, p2) => (Math.abs(p1) < Math.abs(p2) ? 1 : -1))[0] || 0,
.sort((p1, p2) =>
Math.abs(p1) < Math.abs(p2) ? 1 : -1,
)[0] || 0,
)

pointer.trackPoints = []
Expand Down

0 comments on commit 2aa5d2a

Please sign in to comment.