Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom effect is not working when carousel effect is applied #86

Open
hetalsodavadiya opened this issue Jul 24, 2020 · 1 comment
Open

Comments

@hetalsodavadiya
Copy link

                      <div
                        id="slider02"
                        className="carousel carousel-product-detail slide"
                        data-ride="carousel"
                      >
                      <div className="carousel-inner">
                          {

                                SpreeProductImages.map((image, index) => {
                                  imageUrl =
                                    global.config.imageUrl +
                                    SpreeProductImages[0].main_image;
                                  let classname =
                                    index === activeImageIndex ? "active" : "";
                                  return (
                                    <div
                                      className={"carousel-item " + classname}
                                      key={index}
                                    >
                                      <ReactImageMagnify
                                        {...{
                                          smallImage: {
                                          alt="banner slider",
                                            isFluidWidth: true,
                                            src: global.config.imageUrl +
                                              image.main_image,
                                            sizes: '(max-width: 480px) 100vw, (max-width: 1200px) 30vw, 360px'
                                          },
                                          largeImage: {
                                            src: global.config.imageUrl +
                                              image.main_image,
                                            width: 1426,
                                            height: 2000
                                          },
                                          lensStyle: { backgroundColor: 'rgba(0,0,0,.6)' },
                                          enlargedImagePortalId: 'slider02',
                                          enlargedImageContainerDimensions: {
                                            width: '200%',
                                            height: '100%'
                                          },
                                          enlargedImagePosition: "beside"
                                        }}
                                      />
                                    </div>
                                  );
                                })
                             }
                        </div>
                   </div>

Hello @ethanselzer ,
In above code , zoom effect is working only for any one image from carousel. Every time zoom effect is applied for any one image and render zoom image in bottom not beside of div tag. So how can i implement zoom effect for all images while carousel effect is applied ?

@sejanH
Copy link

sejanH commented Sep 7, 2021

@hetalsodavadiya did you find any workarounds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants