Releases: xiel/embla-carousel-wheel-gestures
Releases Β· xiel/embla-carousel-wheel-gestures
v8.0.1
What's Changed
- feat: honor skip snaps by @romancavry in #202
thanks for your contribution! π
Full Changelog: v8.0.0-rc05...v8.0.1
Support embla-carousel v8
embla-carousel v7
- Adapt for the new embla-carousel v7 by @dermotduffy in #170
- Upgrade the plugin to v3.x for compatibility with embla-carousel v7.x
Full Changelog: v2.2.0...v3.0.0
feat: target option
target
option allows you to specify a different target to be observed for wheel events- Thanks to @vitaly-phntm for suggesting this feature #165 π
- Demo supports target option now
Shadow DOM Support π§π»ββοΈ
- Added Support for use in Shadow DOM #159
- Thanks to @careless-esper for opening the issue + providing a repro & fix π
- Demo available
π¦ Published as v2.1.1
Full Changelog: v2.1.0...v2.1.1
feat: Global (Default) Options - v2.1.0
New Feature β¨
- feat: Global options in #156
- Thanks for opening the issues π @nikrowell @davidcetinkaya
- davidjerleke/embla-carousel#175 #155
WheelGesturesPlugin.globalOptions = {
wheelDraggingClass: 'my-class',
}
Full Changelog: v2.0.0...v2.1.0
Option: forceWheelAxis
Extra UMD Bundle
- Exports for CJS and ESM modules stay the same
- Adds an UMD bundle to the distributed package, so it can be included via unpkg etc. (fixes #147)
- The plugin is exposed as
EmblaCarouselWheelGestures
on the global object (window
), when embedding the UMD bundle using a script tag
Usage
<script src="https://unpkg.com/embla-carousel/embla-carousel.umd.js"></script>
<script src="https://unpkg.com/embla-carousel-wheel-gestures/dist/embla-carousel-wheel-gestures.umd.js"></script>
<script type="text/javascript">
EmblaCarousel(document.querySelector('.embla__viewport'), { skipSnaps: true }, [
EmblaCarouselWheelGestures(),
])
</script>
Thanks to @davidcetinkaya for the idea to also provide an UMD bundle! π‘
Full Changelog: v2.0.0...v2.0.2
Embla Plugin
- Wheel Gestures is now a Plugin for Embla using the new plugin system (PR #144)
- ensure to pass the plugin instance in the new plugins array to Embla.
Examples
React
useEmblaCarousel({ skipSnaps: true }, [
WheelGesturesPlugin()
])
Vanilla
const embla = EmblaCarousel(
viewPort as HTMLElement,
{
loop: false,
skipSnaps: true,
},
[
// Add support for wheel gestures
WheelGesturesPlugin(),
]
)
Full Changelog: v1.2.0...v2.0.0
Compatibility for Embla v6
- Upgrade for embla-carousel v6 (by @ikuyok & @xiel in #142 #145)
- Compatibility with previous versions of embla-carousel is maintained to make auto-upgrading a breeze.
Full Changelog: v1.1.1...v1.2.0