embla-carousel
Advanced tools
Comparing version 2.2.1 to 2.2.2
export declare type Callback = () => void; | ||
export declare type Event = 'init' | 'click' | 'select' | 'dragStart' | 'dragEnd' | 'destroy' | 'resize'; | ||
export declare type Event = 'init' | 'scroll' | 'select' | 'dragStart' | 'dragEnd' | 'destroy' | 'resize'; | ||
export declare type EventDispatcher = { | ||
@@ -4,0 +4,0 @@ dispatch: (evt: Event) => EventDispatcher; |
@@ -773,2 +773,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
if (slider.mover.location.get() !== target.get()) { | ||
events.dispatch('scroll'); | ||
} | ||
slider.translate.to(slider.mover.location); | ||
@@ -1209,3 +1213,3 @@ slider.animation.proceed(); | ||
function click(evt) { | ||
if (state.preventClick) evt.preventDefault();else events.dispatch('click'); | ||
if (state.preventClick) evt.preventDefault(); | ||
} | ||
@@ -1936,3 +1940,2 @@ | ||
var subscribers = { | ||
click: [], | ||
destroy: [], | ||
@@ -1943,2 +1946,3 @@ dragEnd: [], | ||
resize: [], | ||
scroll: [], | ||
select: [] | ||
@@ -1945,0 +1949,0 @@ }; |
{ | ||
"name": "embla-carousel", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"author": "David Cetinkaya", | ||
@@ -5,0 +5,0 @@ "private": false, |
@@ -50,7 +50,7 @@ <br /> | ||
<a href="https://github.com/davidcetinkaya/embla-carousel"> | ||
<img src="https://rawgit.com/davidcetinkaya/embla-carousel/master/docs/assets/javascript-logo.svg" height="50" alt="Embla Carousel JavaScript" /> | ||
<img src="https://rawgit.com/davidcetinkaya/embla-carousel/master/docs/assets/javascript-logo.svg" height="50" alt="JavaScript" /> | ||
</a> | ||
| ||
<a href="https://github.com/davidcetinkaya/embla-carousel-react"> | ||
<img src="https://rawgit.com/davidcetinkaya/embla-carousel/master/docs/assets/react-logo.svg" height="50" alt="Embla Carousel React" /> | ||
<img src="https://rawgit.com/davidcetinkaya/embla-carousel/master/docs/assets/react-logo.svg" height="50" alt="React" /> | ||
</a> | ||
@@ -355,3 +355,3 @@ </p> | ||
- **`select`** - When a new target slide has been selected. | ||
- **`click`** - When carousel is actually clicked and not dragged. | ||
- **`scroll`** - When carousel is scrolled. | ||
- **`resize`** - When window size changes. | ||
@@ -394,18 +394,15 @@ - **`dragStart`** - When carousel dragging begins. | ||
## Contribution | ||
<br> | ||
Thank you to all the people who already contributed to Embla Carousel 🙏! | ||
Do you like this project and want to contribute to it? | ||
<h2 align="center">Open Source</h2> | ||
- **`I like it`**: Thank you! Give it a **star** maybe ⭐? | ||
- **`I want to get my hands dirty`**: Awesome! Read the [contribution guidelines](https://github.com/davidcetinkaya/embla-carousel/blob/master/CONTRIBUTING.md) first 📋. | ||
<p align="center"> | ||
<sup>Copyright © 2019-present, David Cetinkaya.</sup><br> | ||
Embla is <a href="https://github.com/davidcetinkaya/embla-carousel/blob/master/LICENSE">MIT licensed</a> 💖 | ||
</p> | ||
<br> | ||
<br> | ||
<h2 align="center">License</h2> | ||
<p align="center"> | ||
<sup>Copyright © 2019-present, David Cetinkaya.</sup><br> | ||
Embla is <a href="https://github.com/davidcetinkaya/embla-carousel/blob/master/LICENSE">MIT licensed</a>. | ||
📋 <a href="https://github.com/davidcetinkaya/embla-carousel/blob/master/CONTRIBUTING.md">contribution</a> | ||
</p> |
1998
76021
406