Open evolutionjay opened 8 years ago
In this line https://github.com/johnpolacek/imagefill.js/blob/master/js/jquery-imagefill.js#L100
setTimeout(checkSizeChange, settings.throttle);
change to requestAnimationFrame will better performance
requestAnimationFrame
https://developer.mozilla.org/zh-CN/docs/Web/API/Window/requestAnimationFrame
In this line https://github.com/johnpolacek/imagefill.js/blob/master/js/jquery-imagefill.js#L100
change to
requestAnimationFrame
will better performancehttps://developer.mozilla.org/zh-CN/docs/Web/API/Window/requestAnimationFrame