When viewing a portrait image on a landscape screen (or vice versa), there is whitespace to the side of the image. For the unzoomed image, this is necessary to preserve the aspect ratio.
But when zooming in, it would be much more natural if the image could expand to fill the parent element, rather than being constrained to the original image size. Here, the whitespace is wasted - there is no reason why the image shouldn't expand horizontally.
Is it possible to modify the library so that the image is cropped to a parent, rather than its original size?
I'm using wheelzoom with your colorbox library.
When viewing a portrait image on a landscape screen (or vice versa), there is whitespace to the side of the image. For the unzoomed image, this is necessary to preserve the aspect ratio.
But when zooming in, it would be much more natural if the image could expand to fill the parent element, rather than being constrained to the original image size. Here, the whitespace is wasted - there is no reason why the image shouldn't expand horizontally.
Is it possible to modify the library so that the image is cropped to a parent, rather than its original size?