scalize
scalize copied to clipboard
Image not fully loaded in memory. Parent width set to zero.
I've encountered a problem on iPad while scrolling. The new created image wasn't fully loaded in memory and the width was 0 and the while parent container had width set to 0.
I've tinkered a little bit and the easiest solution is to get the image directly from the DOM that is already available in elem.find('.target')[0]
My proposal is to change the scalize.js:
From:
var image = new Image();
image.src = elem.find('.target').attr("src");
To:
var image = elem.find('.target')[0];