1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-09-01 17:12:43 +02:00

Updated Core API (markdown)

Antonio Laguna
2017-04-19 18:02:12 +02:00
parent 1817d363a0
commit 953b9f8da4

@@ -116,4 +116,24 @@ These properties are inside of the WebSlides instance and they could be useful t
- `options`: An object with all the options given to the constructor (as seen above).
- `initialised`: A Boolean indicating whether WebSlides has finished the initialisation or not.
### Events
WebSlides fires events on the WebSlide's element.
#### `ws:init`
Called once WebSlides has been initialised and the `initialised` flag is set to `true`. This happens _after_ all plugins have been created and all Slides have been parsed (in that order).
#### `ws:slide-change`
Called once the slide **has finished** transitioning into view. The `event.detail` contains the following information:
```javascript
{
slides: Number, // Number of slides on WebSlides (this wont change)
currentSlide0: Number, // Current slide index (0 based)
currentSlide: Number // Current slide index
}
```
## `Slide` class