Hi, I have a problem with images on ios. Images has with width=1px height=0px. I can resolve it with getting height and width on image.onload in lightboxSrc directive.
was
var image = new Image();
image.src = src;
// these variables must be set before resize(), as they are used in it
imageWidth = image.naturalWidth;
imageHeight = image.naturalHeight;
resize();
I do
var image = new Image();
image.src = src;
image.onLoad = function(){
imageWidth = image.naturalWidth;
imageHeight = image.naturalHeight;
resize();
};
Hi, I have a problem with images on ios. Images has with width=1px height=0px. I can resolve it with getting height and width on image.onload in lightboxSrc directive.
was
I do
it's work, but I don't know, is it good solution.