@websolutespa/bom-mixer-ui 1.7.6 → 1.7.7
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/CHANGELOG.md +6 -0
- package/dist/cjs/index.js +3 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/svg-animation/svg-animation.js +3 -4
- package/dist/esm/components/svg-animation/svg-animation.js.map +1 -1
- package/dist/types/components/svg-animation/svg-animation.d.ts +0 -1
- package/dist/types/components/svg-animation/svg-animation.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/svg-animation/svg-animation.tsx +2 -4
package/CHANGELOG.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -6690,12 +6690,11 @@ const SvgAnimation = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
|
|
|
6690
6690
|
animation,
|
|
6691
6691
|
mode = SvgAnimationStrategy.Default,
|
|
6692
6692
|
loop = false,
|
|
6693
|
-
scrollable = false,
|
|
6694
6693
|
scrollableRef,
|
|
6695
6694
|
width,
|
|
6696
6695
|
height
|
|
6697
6696
|
} = _a,
|
|
6698
|
-
props = __rest(_a, ["className", "href", "animation", "mode", "loop", "
|
|
6697
|
+
props = __rest(_a, ["className", "href", "animation", "mode", "loop", "scrollableRef", "width", "height"]);
|
|
6699
6698
|
if (!href && !animation) {
|
|
6700
6699
|
throw 'SvgAnimation.error: please submit an animation loader or a href';
|
|
6701
6700
|
}
|
|
@@ -6763,10 +6762,10 @@ const SvgAnimation = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
|
|
|
6763
6762
|
playerRef.current.stop();
|
|
6764
6763
|
}
|
|
6765
6764
|
}
|
|
6766
|
-
}, [isIntersecting,
|
|
6765
|
+
}, [isIntersecting, mode, shouldLoad]);
|
|
6767
6766
|
// handle scroll
|
|
6768
6767
|
React.useEffect(() => {
|
|
6769
|
-
const scrollElement =
|
|
6768
|
+
const scrollElement = mode === SvgAnimationStrategy.Scroll ? scrollableRef ? scrollableRef.current : window : undefined;
|
|
6770
6769
|
const onScroll = () => {
|
|
6771
6770
|
if (elementRef.current && playerRef.current) {
|
|
6772
6771
|
let top = 0;
|