vue-expandable-image
vue-expandable-image copied to clipboard
Add a stretch=false option to prevent image from being stretched fullscreen
Great plugin! Thanks
If the image is smaller than the screen, it still gets stretched up to the screen size, hence appears pixelized.
I removed this by having:
<expandable-image class="no-stretch" :src="img"></expandable-image>
<style>
body > .expandable-image.expanded.no-stretch > img {
width: auto;
height: auto;
}
</style>
This should definitely be an attribute of the component, with stretch="true"
being the default behavior for backward compatibility (though I doubt this is actually the most useful case).