react-magic-card 0.1.6 → 0.1.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.
|
@@ -134,7 +134,6 @@ const MagicCircle = ({ images, height, width, radius, controller, start, dynamic
|
|
|
134
134
|
elm.addEventListener('mouseover', enterControll);
|
|
135
135
|
elm.addEventListener('mouseout', leaveControll);
|
|
136
136
|
elm.addEventListener('touchmove', enterControll);
|
|
137
|
-
elm.addEventListener('touchcancel', leaveControll);
|
|
138
137
|
elm.addEventListener('touchend', leaveControll);
|
|
139
138
|
});
|
|
140
139
|
// Clean up event when component is unmount.
|
|
@@ -145,7 +144,6 @@ const MagicCircle = ({ images, height, width, radius, controller, start, dynamic
|
|
|
145
144
|
elm.removeEventListener('mouseover', enterControll);
|
|
146
145
|
elm.removeEventListener('mouseout', leaveControll);
|
|
147
146
|
elm.removeEventListener('touchmove', enterControll);
|
|
148
|
-
elm.removeEventListener('touchcancel', leaveControll);
|
|
149
147
|
elm.removeEventListener('touchend', leaveControll);
|
|
150
148
|
});
|
|
151
149
|
};
|
|
@@ -206,6 +204,9 @@ const MagicCircle = ({ images, height, width, radius, controller, start, dynamic
|
|
|
206
204
|
'px'
|
|
207
205
|
} }));
|
|
208
206
|
}))),
|
|
209
|
-
react_1.default.createElement(PickImage_1.default, { onClick: () =>
|
|
207
|
+
react_1.default.createElement(PickImage_1.default, { onClick: () => {
|
|
208
|
+
leaveControll();
|
|
209
|
+
setHasPick(false);
|
|
210
|
+
}, hasPick: hasPick, classPick: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.classPick, white: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.white, alpha: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.alpha, blur: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.blur, scale: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.scale, offset: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.offset, hasShift: hasShift, argRef: div2Ref, argKey: select, src: images[select].src, alt: images[select].alt, width: width, height: height, transition: pickTransition, zIndex: images.length + 1 })));
|
|
210
211
|
};
|
|
211
212
|
exports.MagicCircle = MagicCircle;
|
|
@@ -132,7 +132,6 @@ const MagicStraight = ({ images, height, width, start, controller, wheelDelay, v
|
|
|
132
132
|
elm.addEventListener('mouseover', enterControll);
|
|
133
133
|
elm.addEventListener('mouseout', leaveControll);
|
|
134
134
|
elm.addEventListener('touchmove', enterControll);
|
|
135
|
-
elm.addEventListener('touchcancel', leaveControll);
|
|
136
135
|
elm.addEventListener('touchend', leaveControll);
|
|
137
136
|
});
|
|
138
137
|
// Clean up event when component is unmount.
|
|
@@ -143,7 +142,6 @@ const MagicStraight = ({ images, height, width, start, controller, wheelDelay, v
|
|
|
143
142
|
elm.removeEventListener('mouseover', enterControll);
|
|
144
143
|
elm.removeEventListener('mouseout', leaveControll);
|
|
145
144
|
elm.removeEventListener('touchmove', enterControll);
|
|
146
|
-
elm.removeEventListener('touchcancel', leaveControll);
|
|
147
145
|
elm.removeEventListener('touchend', leaveControll);
|
|
148
146
|
});
|
|
149
147
|
};
|
|
@@ -210,6 +208,9 @@ const MagicStraight = ({ images, height, width, start, controller, wheelDelay, v
|
|
|
210
208
|
margin: vertical ? margin + 'px' + ' 0' : '0 ' + margin + 'px'
|
|
211
209
|
} }));
|
|
212
210
|
})),
|
|
213
|
-
react_1.default.createElement(PickImage_1.default, { onClick: () =>
|
|
211
|
+
react_1.default.createElement(PickImage_1.default, { onClick: () => {
|
|
212
|
+
leaveControll();
|
|
213
|
+
setHasPick(false);
|
|
214
|
+
}, hasPick: hasPick, classPick: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.classPick, white: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.white, alpha: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.alpha, blur: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.blur, scale: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.scale, offset: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.offset, hasShift: hasShift, argRef: div2Ref, argKey: select, src: images[select].src, alt: images[select].alt, width: width, height: height, transition: pickTransition, zIndex: images.length + 1 })));
|
|
214
215
|
};
|
|
215
216
|
exports.MagicStraight = MagicStraight;
|
|
@@ -11,7 +11,6 @@ const PickImage = ({ onClick, classPick, hasPick, hasShift, argRef, argKey, src,
|
|
|
11
11
|
zIndex: zIndex,
|
|
12
12
|
opacity: hasPick ? 1 : 0,
|
|
13
13
|
pointerEvents: hasPick ? 'auto' : 'none',
|
|
14
|
-
visibility: hasPick ? 'visible' : 'hidden',
|
|
15
14
|
backdropFilter: `blur(${blur}px)`,
|
|
16
15
|
background: white
|
|
17
16
|
? `rgba(255, 255, 255, ${alpha})`
|