From 1cc1560bc07306c538b6ef923bf38ddddad1aecc Mon Sep 17 00:00:00 2001 From: Antonio Laguna Date: Wed, 29 Apr 2020 07:45:01 +0200 Subject: [PATCH] Updated Core API (markdown) --- Core-API.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Core-API.md b/Core-API.md index 745408a..a32883c 100644 --- a/Core-API.md +++ b/Core-API.md @@ -69,7 +69,7 @@ Do you want to get your hands dirty? This is the API for the WebSlides module: Goes to a given slide. | Param | Type | Description | -| --- | --- | --- | --- | +| ----- | ---- | ----------- | | slideIndex | number | The slide index. | | forward | boolean | Whether we're forcing moving forward/backwards. This parameter is used only from the `goNext`, `goPrev` functions to adjust the scroll animations. | @@ -86,7 +86,8 @@ Goes to the previous slide. If the page is vertical, it will animate the scroll ### `registerPlugin(key, cto)` -Registers a plugin to be loaded when the instance is created. It allows (on purpose) to replace default plugins. + +Register a plugin to be loaded when the instance is created. It allows (on purpose) to replace default plugins. Those being: @@ -110,7 +111,7 @@ You can [read more](Plugin-development) about plugin development. ### Public properties -These properties are inside of the WebSlides instance and they could be useful to achieve new behaviours. +These properties are inside of the WebSlides instance and they could be useful to achieve new behaviors. - `el`: The DOM node to which WebSlides is attached. - `isMoving`: A Boolean indicating whether a transition is happening. @@ -128,6 +129,8 @@ WebSlides fires events on the WebSlide's element. 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). +> This will happen *synchronously* at the same time the instance is created so make sure you place your event listener *before* the constructor is instantiated. + #### `ws:slide-change` Called once the slide **has finished** transitioning into view. The `event.detail` contains the following information: