react-magic-card 0.2.0 → 0.2.1

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.
@@ -92,6 +92,8 @@ const MagicCircle = ({ images, height, width, dynamic = true, clockwise = true,
92
92
  setHasDelayed(true);
93
93
  }, delay);
94
94
  // Add handle event when component mount and deps update.
95
+ if (!hasDelayed)
96
+ return;
95
97
  outer.addEventListener('wheel', handleWheel, { passive: true });
96
98
  outer.addEventListener('touchstart', handleTouchStart, { passive: true });
97
99
  outer.addEventListener('touchmove', handleTouchMove, { passive: true });
@@ -101,6 +101,8 @@ const MagicStraight = ({ images, height, width, vertical = true, margin = 0, sel
101
101
  setHasDelayed(true);
102
102
  }, delay);
103
103
  // Add handle event when component mount and deps update.
104
+ if (!hasDelayed)
105
+ return;
104
106
  outer.addEventListener('wheel', handleWheel, { passive: true });
105
107
  outer.addEventListener('touchstart', handleTouchStart, { passive: true });
106
108
  outer.addEventListener('touchmove', handleTouchMove, { passive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-magic-card",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "image gallery components with framer motion",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",