Hello, I have the following code that displays an image
<img ng-src="someimage.jpg"
ng-class="{'zm-image-fit':imageStyle==true, 'zm-image-crop':imageStyle==false}"/>
Where
.zm-image-fit
{
max-width: 100%;
max-height: 100%;
}
.zm-image-crop
{
width:100%;
}
Depending on a button a user presses, the image is “refitted” on the screen. If it uses zm-image-crop then the image covers the entire screen but may crop the height. If it uses zm-image-fit then it displays the entire image.
This works on iOS and desktop Safari but not in Android. In Android the image does not re-fit itself. Any suggestions?