|
@@ -95,7 +95,7 @@ export const SliderImage = ({images = [], className, onChange, onClick, ...props
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
const viewPortWidth = containerRef.current.getBoundingClientRect().width
|
|
const viewPortWidth = containerRef.current.getBoundingClientRect().width
|
|
- const clickX = e.clientX
|
|
|
|
|
|
+ const clickX = e.clientX -e.target.getBoundingClientRect().x
|
|
const {scrollLeft} = containerRef.current;
|
|
const {scrollLeft} = containerRef.current;
|
|
if (clickX > viewPortWidth * 0.75) {
|
|
if (clickX > viewPortWidth * 0.75) {
|
|
if (i < images.length -1){
|
|
if (i < images.length -1){
|