laurenashpole / vue-inner-image-zoom

https://laurenashpole.github.io/vue-inner-image-zoom
140 stars 16 forks source link

Crops image if max height is set #26

Closed dunhamjared closed 3 years ago

dunhamjared commented 3 years ago

Issue

Crops the image if I set a max height to the component and the image height goes beyond the max height.

Expected

I expected the image to resize itself to the max height.

Steps

I am able to replicate it with a simple max height style change on the component itself:

<inner-image-zoom src="https://placekitten.com/500/900" style="max-height: 200px"/>

Vs what I expect:


<img src="https://placekitten.com/500/900" style="max-height: 200px"/>
laurenashpole commented 3 years ago

Hey @dunhamjared. That's the expected behavior if you set a max-height on an image container. If you want to set a max-height on the image itself, you can apply styling using the class iiz__img.