Fixed potential performance bottleneck

This commit is contained in:
Tobias Reich 2015-07-09 15:22:12 +02:00
parent cb88c90cbd
commit 9a53ab5615

View File

@ -143,10 +143,6 @@ view.album = {
var photosData = '';
// Save and reset scroll position
view.albums.content.scrollPosition = $(document).scrollTop();
$('html, body').scrollTop(0);
if (album.json.content&&album.json.content!==false) {
// Build photos
@ -156,6 +152,10 @@ view.album = {
}
// Save and reset scroll position
view.albums.content.scrollPosition = $(document).scrollTop();
requestAnimationFrame(() => $(document).scrollTop(0));
// Add photos to view
lychee.content.html(photosData);