@total_onion/onion-library 2.0.95 → 2.0.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,23 @@
1
- export const options = {
2
- // root: document.querySelector('#scrollArea'),
3
- rootMargin: "0px",
4
- scrollMargin: "0px",
5
- threshold: 1,
1
+ export const triggerOptions = {
2
+ // root: document.querySelector('#scrollArea'),
3
+ rootMargin: '0px',
4
+ scrollMargin: '0px',
5
+ threshold: 1
6
6
  };
7
- export function triggerEntryAnimation(element, loaderOptions) {
8
- const intersectionCallback = (entries) => {
9
- entries.forEach((entry) => {
10
- if (entry.isIntersecting) {
11
- let elem = entry.target;
7
+ export function triggerEntryAnimation(element) {
8
+ const intersectionCallback = (entries) => {
9
+ entries.forEach((entry) => {
10
+ if (entry.isIntersecting) {
11
+ let elem = entry.target;
12
12
 
13
- elem.classList.add("trigger-animation");
14
- }
15
- });
16
- };
17
- const observer = new IntersectionObserver(intersectionCallback, options);
13
+ elem.classList.add('trigger-animation');
14
+ }
15
+ });
16
+ };
17
+ const observer = new IntersectionObserver(
18
+ intersectionCallback,
19
+ triggerOptions
20
+ );
18
21
 
19
- observer.observe(element);
22
+ observer.observe(element);
20
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "2.0.95",
3
+ "version": "2.0.96",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {