@total_onion/onion-library 2.0.188 → 2.0.189

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.
@@ -111,15 +111,17 @@ function scrollingbannerJs(block) {
111
111
  const anim2 = containers[1].animate(animation2, timing2);
112
112
 
113
113
  initializedBanners.set(bannerElement, {anim1, anim2});
114
+ function pauseAnimations() {
115
+ containers[0].pause();
116
+ containers[1].pause();
117
+ }
118
+ function resumeAnimations() {
119
+ containers[0].play();
120
+ containers[1].play();
121
+ }
114
122
  if (bannerElement.querySelector('a')) {
115
- block.addEventListener('mouseover', () => {
116
- anim1.pause();
117
- anim2.pause();
118
- });
119
- block.addEventListener('mouseleave', () => {
120
- anim1.play();
121
- anim2.play();
122
- });
123
+ block.addEventListener('mouseover', pauseAnimations);
124
+ block.addEventListener('mouseleave', resumeAnimations);
123
125
  }
124
126
  }
125
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "2.0.188",
3
+ "version": "2.0.189",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {