@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
|
-

|
|
3
3
|

|
|
4
4
|
[](#)
|
|
5
5
|
[](https://twitter.com/captain\_iris)
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
}
|