Skip to content

Commit

Permalink
Merge pull request #39 from xiel/update-embla-v4.0.6
Browse files Browse the repository at this point in the history
Add checks
  • Loading branch information
xiel authored Oct 23, 2020
2 parents 99e6c20 + 9dcc3b5 commit 5af0b41
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-demo",
"private": true,
"version": "1.0.5",
"version": "1.0.6",
"description": "Embla Carousel - Options demonstration.",
"main": "react.html",
"scripts": {
Expand All @@ -12,7 +12,7 @@
"@types/react": "^16.9.41",
"@types/react-dom": "^16.9.8",
"embla-carousel": "^4.0.6",
"embla-carousel-wheel-gestures": "^1.0.5",
"embla-carousel-wheel-gestures": "^1.0.6",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
Expand Down
4 changes: 2 additions & 2 deletions docs/vanilla/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vanilla-demo",
"private": true,
"version": "1.0.5",
"version": "1.0.6",
"description": "Embla Carousel - Options demonstration.",
"main": "index.html",
"scripts": {
Expand All @@ -10,7 +10,7 @@
},
"dependencies": {
"embla-carousel": "^4.0.6",
"embla-carousel-wheel-gestures": "^1.0.5"
"embla-carousel-wheel-gestures": "^1.0.6"
},
"devDependencies": {
"@babel/core": "7.11.4",
Expand Down
2 changes: 1 addition & 1 deletion embla-carousel-wheel-gestures/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "embla-carousel-wheel-gestures",
"private": false,
"version": "1.0.5",
"version": "1.0.6",
"description": "wheel gestures for embla carousel",
"main": "dist/index.js",
"module": "dist/embla-carousel-wheel-gestures.esm.js",
Expand Down
6 changes: 5 additions & 1 deletion embla-carousel-wheel-gestures/src/setupWheelGestures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ export function setupWheelGestures(embla: TEmblaCarousel) {

function wheelGestureEnded() {
engine.scrollBounds.toggleActive(true)
engine.scrollBody.useBaseSpeed()
isStarted = false

// does not exist when used with version < 4.0.6
if (engine.scrollBody.useBaseSpeed) {
engine.scrollBody.useBaseSpeed()
}
}

function cleanup() {
Expand Down

1 comment on commit 5af0b41

@vercel
Copy link

@vercel vercel bot commented on 5af0b41 Oct 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.