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