-
Notifications
You must be signed in to change notification settings - Fork 121
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
Image is not visible if its parent is styled as overflow: hidden
#22
Comments
overflow: hidden
@kingdido999 this solution does not work if |
@artaommahe The latest build removes parent |
@kingdido999 it solves issue with wrong overflow on container with scrollbar but does not solve image cutting due to |
@artaommahe yeah it does not work with |
@kingdido999 I'm surprised that with Do you have an idea why? Thank you for your help! 😄 |
@kingdido999 a simple fix to overflow problem is to add two events to
It will offer people needing overflow a way to toggle a class on the container. What do you think? |
@jimblue can you elaborate more? Would existing event listeners like |
@kingdido999 I'm not sure Anyway, they could help with this problem, so here is my idea: HTML <html>
<body class="overflow_x">
// body content here
</body>
</html> JS new Zooming({
onBeforeOpen: () => {
document.body.classList.remove('overflow_x')
},
onClose: () => {
document.body.classList.add('overflow_x')
}
}) CSS body.overflow_x {
overflow-x: hidden;
} I didn't test this solution for know... Cheers |
Opened an issue to keep track of adding image wrapper #44. |
I don't intend to find a fix at this point. I'll accept it as a known issue and mention it in the README. |
@jimblue This solution looks interesting. But as you said, the documentation on the event seems lacking. Do the events pass anything to the handler function? In my case, I have |
If the parent of the image is styled as
overflow: hidden
, the image will not be visible. Needs to find a way to ignoreoverflow: hidden
.The text was updated successfully, but these errors were encountered: