I'm working with a mobile WebView and I'm fullscreening an image. In some scenarios I can prevent the image from getting too torn apart by rotating the image 90 degrees if the width of the image is greater than the height of the image.
I know I can rotate the image using the css transform
property, but I can't quite figure out how to do the math for the size of the image.
All of the images are pulled from a remote location using http
EDIT: I may have left out some important information!!
I am using ionic
and this specific element that I need to access is in an $ionicModal
and is not actually a dom element, according the ionic moderators. Therefor I cannot use document.getElementById
on it.