@iris.interactive/handcook 2.10.21 → 2.10.22

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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Welcome to HandCook 👨‍🍳
2
- ![Version](https://img.shields.io/badge/version-2.10.21-blue.svg?cacheSeconds=2592000)
2
+ ![Version](https://img.shields.io/badge/version-2.10.22-blue.svg?cacheSeconds=2592000)
3
3
  ![Prerequisite](https://img.shields.io/badge/node-%3E%3D%2012.14.0-blue.svg)
4
4
  [![License: UNLICENSED](https://img.shields.io/badge/License-UNLICENSED-yellow.svg)](#)
5
5
  [![Twitter: captain\_iris](https://img.shields.io/twitter/follow/captain\_iris.svg?style=social)](https://twitter.com/captain\_iris)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iris.interactive/handcook",
3
- "version": "2.10.21",
3
+ "version": "2.10.22",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
@@ -33,6 +33,7 @@ export class HcScrollReveal {
33
33
  let interval = distanceInterval;
34
34
  let origin = distanceOrigin;
35
35
 
36
+
36
37
  //Children by parent
37
38
  const parents = document.querySelectorAll(ElementEnum.scrollRevealParent);
38
39
  parents.forEach( parent => {
@@ -67,20 +68,13 @@ export class HcScrollReveal {
67
68
  origin = distanceOrigin;
68
69
  }
69
70
 
70
- //Add enumerator + eviter saut au chargement
71
- Array.prototype.forEach.call(parent.children, child => {
72
- if (!child.hasAttribute('data-hc-noscroll-reveal') && !child.hasAttribute('data-hc-scroll-reveal-child') && !child.hasAttribute(ElementEnum.scrollRevealParent)) {
73
- child.setAttribute('data-hc-scroll-reveal-child', '');
74
- }
75
- });
76
-
77
- ScrollReveal().reveal(parent.querySelectorAll("[data-hc-scroll-reveal-child]"), {
71
+ ScrollReveal().reveal(parent.querySelectorAll(ElementEnum.scrollRevealChildren), {
78
72
  distance: distance,
79
73
  delay: delay,
80
74
  duration: duration,
81
75
  interval: interval,
82
76
  origin: origin,
83
- beforeReveal: function (element) {
77
+ afterReveal: function (element) {
84
78
  element.classList.add('hc-scroll-reveal-is-visible');
85
79
  },
86
80
  });
@@ -126,7 +120,7 @@ export class HcScrollReveal {
126
120
  duration: duration,
127
121
  interval: interval,
128
122
  origin: origin,
129
- beforeReveal: function (element) {
123
+ afterReveal: function (element) {
130
124
  element.classList.add('hc-scroll-reveal-is-visible');
131
125
  },
132
126
  });
@@ -1,21 +0,0 @@
1
- /*!
2
- * IRIS Interactive
3
- *
4
- * NOTICE OF LICENSE
5
- *
6
- * This source file is no subject to a specific license
7
- * but it belongs to the company IRIS Interactive.
8
- * You can contact IRIS Interactive at the following
9
- * address: contact@iris-interactive.fr
10
- *
11
- * @author Stephan JAMBOU
12
- * @date 22/02/2022 14:57
13
- * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */
15
-
16
- //ScrollReveal
17
- [data-hc-scroll-reveal-parent],
18
- [data-hc-scroll-reveal-child],
19
- [data-hc-scroll-reveal] {
20
- visibility: hidden;
21
- }