@iris.interactive/handcook 2.10.21 → 2.10.23

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.
@@ -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 +1 @@
1
- (()=>{"use strict";var a={812:(a,t,o)=>{function e(a,t,o){return t in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}var r=function a(){!function(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a)};e(r,"tooltip","[data-hc-tooltip], [data-hc-popover]"),e(r,"popover","[data-hc-popover]"),e(r,"scrollSmooth","[data-hc-smooth-scroll]"),e(r,"modal","[data-hc-modal]"),e(r,"modalClose","[data-hc-modal-close]"),e(r,"lightboxAttr","data-hc-lightbox"),e(r,"lightbox","[".concat(r.lightboxAttr,"]")),e(r,"dropdown","[data-hc-dropdown]"),e(r,"collapse","[data-hc-collapse]"),e(r,"collapseItem","[data-hc-collapse-item]"),e(r,"popin","[data-hc-popin]"),e(r,"tab","[data-hc-tab]"),e(r,"toggle","[data-hc-toggle]"),e(r,"slider","[data-hc-slider]"),e(r,"scrollspy","[data-hc-scrollspy]"),e(r,"scrollspyNav","[data-hc-scrollspy-nav]"),e(r,"scrollspyNavItem","[data-hc-scrollspy-nav-item]"),e(r,"scrollRevealParent","[data-hc-scroll-reveal-parent]"),e(r,"scrollReveal","[data-hc-scroll-reveal]")},539:(a,t,o)=>{function e(a,t,o){return t in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}var r=function a(){!function(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a)};e(r,"attrHref","data-hc-smooth-scroll-href"),e(r,"attrShift","data-hc-smooth-scroll-shift")}},t={};function o(e){var r=t[e];if(void 0!==r)return r.exports;var l=t[e]={exports:{}};return a[e](l,l.exports,o),l.exports}o.d=(a,t)=>{for(var e in t)o.o(t,e)&&!o.o(a,e)&&Object.defineProperty(a,e,{enumerable:!0,get:t[e]})},o.o=(a,t)=>Object.prototype.hasOwnProperty.call(a,t),o(812),o(539)})();
1
+ (()=>{"use strict";var a={812:(a,t,o)=>{function e(a,t,o){return t in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}var l=function a(){!function(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a)};e(l,"tooltip","[data-hc-tooltip], [data-hc-popover]"),e(l,"popover","[data-hc-popover]"),e(l,"scrollSmooth","[data-hc-smooth-scroll]"),e(l,"modal","[data-hc-modal]"),e(l,"modalClose","[data-hc-modal-close]"),e(l,"lightboxAttr","data-hc-lightbox"),e(l,"lightbox","[".concat(l.lightboxAttr,"]")),e(l,"dropdown","[data-hc-dropdown]"),e(l,"collapse","[data-hc-collapse]"),e(l,"collapseItem","[data-hc-collapse-item]"),e(l,"popin","[data-hc-popin]"),e(l,"tab","[data-hc-tab]"),e(l,"toggle","[data-hc-toggle]"),e(l,"slider","[data-hc-slider]"),e(l,"scrollspy","[data-hc-scrollspy]"),e(l,"scrollspyNav","[data-hc-scrollspy-nav]"),e(l,"scrollspyNavItem","[data-hc-scrollspy-nav-item]"),e(l,"scrollRevealParent","[data-hc-scroll-reveal-parent]"),e(l,"scrollRevealChildren","[data-hc-scroll-reveal-parent] > *:not([data-hc-noscroll-reveal]):not([data-hc-scroll-reveal-parent])"),e(l,"scrollReveal","[data-hc-scroll-reveal]")},539:(a,t,o)=>{function e(a,t,o){return t in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}var l=function a(){!function(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a)};e(l,"attrHref","data-hc-smooth-scroll-href"),e(l,"attrShift","data-hc-smooth-scroll-shift")}},t={};function o(e){var l=t[e];if(void 0!==l)return l.exports;var r=t[e]={exports:{}};return a[e](r,r.exports,o),r.exports}o.d=(a,t)=>{for(var e in t)o.o(t,e)&&!o.o(a,e)&&Object.defineProperty(a,e,{enumerable:!0,get:t[e]})},o.o=(a,t)=>Object.prototype.hasOwnProperty.call(a,t),o(812),o(539)})();