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

zoomType is "hover" and zoomPreload is "false" style top or left miscalculation #120

Open
WhaleFallXH opened this issue Jun 28, 2022 · 2 comments

Comments

@WhaleFallXH
Copy link

<InnerImageZoom src="unsplash.jpg" zoomSrc="unsplash-large.jpg" width={600} height={750} // zoomPreload={true} zoomType="hover" fullscreenOnMobile hideHint hasSpacer />

Warning:NaNis an invalid value for thetopcss style property. in img (at ZoomImage.js:7) in ZoomImage (at InnerImageZoom.js:327) in figure (at InnerImageZoom.js:299)

@WhaleFallXH
Copy link
Author

@laurenashpole

@laurenashpole
Copy link
Owner

@WhaleFallXH I'm unable to reproduce this. Even throttling to simulate a slow network I'm seeing a long pause before the image appears but no warnings. I might need more details on how you're using the component, what version, and what browser you're seeing that warning on to investigate more.

I do recommend using zoomPreload whenever you use to zoomType hover to avoid flickering or any other oddities.

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