Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
Updated dependencies and fixed links in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Nessier committed Jun 10, 2022
1 parent 332e85a commit 99546b0
Show file tree
Hide file tree
Showing 11 changed files with 9,931 additions and 2,657 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars-experimental": "error"
//"@typescript-eslint/no-unused-vars-experimental": "error"
},

}
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ const sm = new Scrollmotion('.sm-item', {
The 1st argument is a selector for the website components you want to get observed and animated (Default:`.sm-item`).
The 2nd argument is an object literal for the options described below (Default:`{}`).

| Key | Type | Description | Default |
|---|---|---|---|
| `root` | Element | Root element for the intersection observer. [Read more](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root). | `null` |
| `rootMargin` | string | Bounding box of the root element. [Read more](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin). | `'0px 0px 0px 0px'` |
| `threshold` | number[] | Threshold to report visibility changes to the observer. [Read more](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/thresholds). | `[0, 0.25, 0.5, 0.75, 1]` |
| `ratio` | number | Ratio how much an observed item has actually been visible before the animation performs. | `0` |
| `observeMutation` | boolean | Set `true` to enable MutationObserver and get new items observed and animated too. | `false` |
| `animateClass` | string | Default CSS class of [Animate.css](https://animate.style) for the animation. | `animate__swing` |
| `initialized` | (container, items) => void | Event callback, when the library is initialized. | `null` |
| `started` | () => void | Event callback, when the library has started. | `null` |
| `itemAnimated` | (item) => void | Event callback, when an item got animated. | `null` |
| `stopped` | () => void | Event callback, when the the library has stopped. | `null` |
| `prepareItem` | (item) => void | Function for preparing the observable items for animation. | [See code](https://github.com/Neoflow/Scrollmotion/blob/master/src/defaultConfig.ts#L17) |
| `animateItem` | (item) => void | Function for animating the intersected item. | [See code](https://github.com/Neoflow/Scrollmotion/blob/master/src/defaultConfig.ts#L20) |
| Key | Type | Description | Default |
|---|---|---|--------------------------------------------------------------------------------------------|
| `root` | Element | Root element for the intersection observer. [Read more](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root). | `null` |
| `rootMargin` | string | Bounding box of the root element. [Read more](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin). | `'0px 0px 0px 0px'` |
| `threshold` | number[] | Threshold to report visibility changes to the observer. [Read more](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/thresholds). | `[0, 0.25, 0.5, 0.75, 1]` |
| `ratio` | number | Ratio how much an observed item has actually been visible before the animation performs. | `0` |
| `observeMutation` | boolean | Set `true` to enable MutationObserver and get new items observed and animated too. | `false` |
| `animateClass` | string | Default CSS class of [Animate.css](https://animate.style) for the animation. | `animate__swing` |
| `initialized` | (container, items) => void | Event callback, when the library is initialized. | `null` |
| `started` | () => void | Event callback, when the library has started. | `null` |
| `itemAnimated` | (item) => void | Event callback, when an item got animated. | `null` |
| `stopped` | () => void | Event callback, when the the library has stopped. | `null` |
| `prepareItem` | (item) => void | Function for preparing the observable items for animation. | [See code](https://github.com/Neoflow/Scrollmotion/blob/master/src/default/options.ts#L12) |
| `animateItem` | (item) => void | Function for animating the intersected item. | [See code](https://github.com/Neoflow/Scrollmotion/blob/master/src/default/options.ts#L15) |

**Please note** If you overwrite the default functions of `prepareItem` or `animateItem`, the handling of
the animations with [Animate.css](https://animate.style) is not supported anymore.
Expand Down
4 changes: 2 additions & 2 deletions build/serve/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!doctype html>
<html>
<html lang="en">
<head>
<title>Getting Started</title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.0/animate.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.min.css"/>
<style>
.sm-item {
Expand Down
6 changes: 3 additions & 3 deletions dist/esm/scrollmotion.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/scrollmotion.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/scrollmotion.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 99546b0

Please sign in to comment.