cubiq/SwipeView — Issue #2: Img load glitch
Author: jdtsmith
Created: 2011-10-23 14:35:25+00:00
State: open

Wonderful tool and fast moving development. I am basing (updating, rather) a [Zenphoto](http://zenphoto.org) theme for iPhone on this. I'm still on v0.3, but this comment should apply to the new version as well.

I'm loading largish images which use almost every pixel of the retina display, and find that the current method of removing the "swipeview-loading" class as soon as the page is "flipped" and the IMG src is updated results in frequent glitches where the old image is still visible for a fraction of a second (often abnormally stretched since the dimensions may have changed), before the new one is downloaded and displayed. The solution I found was to have the masterPage class cleared *only after* image load. This is complicated by the generality of your newer versions (since it knows nothing of the content being paged through). I solved it by removing your class-clearing code, and adding my own, following the SwipeView creation:

```
var images=document.getElementsByTagName("img");
for(var i=0;i