Releases: davidjerleke/embla-carousel
v2.9.0 - Percent Alignment
🌟 New features
The percent alignment
is a new feature. This feature was specified and requested in issue #49.
const options = { align: 0.2 }
const embla = EmblaCarousel(emblaNode, options)
This feature allows users to specify percentage alignment by passing a number, where a fraction like 0.2
represents 20% of the viewport size. Percentage will be measured from the start edge of the viewport.
v2.8.0 - Settle event
🌟 New features
The settle
event is a new feature. This feature was specified and requested in issue #48.
embla.on('settle', () => {
console.log(`The carousel has stopped scrolling.`)
})
The settle
event allows users to hook onto when the carousel has stopped scrolling.
v2.7.4 - Android touch device event bug
🛠️ Bugfixes
This patch resolves one bug:
- It solves issue #27. When Android devices fired the mousemove event during touch interactions, Embla threw a console error. This patch comes with a fix for this issue.
v2.7.0 - ScrollBy
🌟 New features
The API method scrollBy()
is a new feature. This feature was specified in issue #23 and requested in issue #21.
embla.scrollBy(0.5)
The scrollBy()
method allows users to manipulate the current scroll progress by passing a number as an argument. Scroll to target is smooth.
v2.6.5 - Options documentation update
🌟 New features
The options section in the readme has been updated with expandable details for each option:
v2.6.4 - Contextmenu & Mouse Button bug
🛠️ Bugfixes
This patch resolves two bugs:
- It solves issue #37 and cancels any drag interaction when contextmenu is opened.
- For mouse events, the carousel only listens for drag events if clicked mouse button is the left button.
v2.6.0 - Click Allowed
🌟 New features
The API method clickAllowed()
is a new feature. This feature was requested in issue #22 and #24.
embla.clickAllowed()
This method is an opt-in feature. Here is how it works: It returns false
if:
Mouse Pointers
- Mouse drags the carousel.
Touch Pointers
- Touch drags the carousel.
- Carousel is in motion (i.e. is scrolling).
Otherwise it will return true
.
v2.5.5 - Updated NPM packages
📦 Package updates
Outdated NPM packages were updated in this release.
v2.5.3 - ContainScroll bugfix
🛠️ Bugfixes
This release is a fix for the containScroll
bug as described in issue #30.
v2.5.0 - Scroll Progress
🌟 New features
The API method scrollProgress()
is a new feature. Implemented as discussed in issue #21.
embla.scrollProgress()
See this CodeSandbox for example usage.