Releases: barthy-koeln/scroll-snap-slider
Releases · barthy-koeln/scroll-snap-slider
v3.1.1
What's Changed
- fix(main): start and stop resize observer with attach/detach by @barthy-koeln in #25
- fix(draggable): cancel stop-listener when started dragging again by @barthy-koeln in #24
Full Changelog: v3.3.0...v3.1.1
v3.3.0 | Fixed slide-pass event details
Fixes incorrect slide numbers passed to slide-pass
events. This was due to the asynchronous callback from requestAnimationFrame
.
v3.2.0 | Modern packaging
Fixes usage with modern frameworks.
v3.2.0-rc.0 | Modern packaging
Tries to use a more modern dual-build package for ESM, CJS and UMD.
v3.1.0 | ESM & UMD builds with vite
Added different build types with vite.
The internal file names have changed, the import structure is the same.
v3.0.1 | Release Fix
Messed up the deployment, here's a fixed version.
v3.0.0 | TypeScript Rewrite and minor breaking changes
Migration from v2:
- All options are passed in an object instead of individual constructor parameters
- Use the
.with
method to initialize plugins - Open an issue if I've missed anything :)
const slider = new ScrollSnapSlider({ element }).with([
new ScrollSnapAutoplay(1200),
new ScrollSnapLoop
])
v2.6.0 | Detach Listeners and Loop Improvements
Features
ScrollSnapSlider::detachListeners
now complementsattachListeners
Improvements
ScrollSnapLoop
disables the scroll listener while reordering stuff- Removed git hooks from
postinstall
v2.5.0 — Multiple slides possible
This release allows having slides that are smaller than the slider itself.
Feature: Sizing method
By default, the first slide's offsetWidth
is used to calculate everything. Override this method to change the slider's behavior.
/**
* @callback sizingMethod
* @param {ScrollSnapSlider} slider
* @return {Number} integer size of a slide in pixels
*/
/**
* Width of each slide
* @type {sizingMethod}
* @public
*/
this.sizingMethod = function (slider) {
return slider.element.firstElementChild.offsetWidth
}
v2.4.1 — Rebuild order when disabling ScrollSnapLoop Plugin
[Fixes] Rebuild order when disabling ScrollSnapLoop Plugin #16