Improve performances when expanding all images and they were already loaded.

This commit is contained in:
Nicolas Stepien 2013-03-30 21:37:37 +01:00
parent d4a0af9e21
commit 53ab332406

View File

@ -3272,6 +3272,7 @@ ImageExpand =
return unless $.hasClass thumb, 'expanding' # contracted before the image loaded return unless $.hasClass thumb, 'expanding' # contracted before the image loaded
prev = post.nodes.root.getBoundingClientRect() prev = post.nodes.root.getBoundingClientRect()
post.file.isExpanded = true post.file.isExpanded = true
$.queueTask ->
$.addClass post.nodes.root, 'expanded-image' $.addClass post.nodes.root, 'expanded-image'
$.rmClass post.file.thumb, 'expanding' $.rmClass post.file.thumb, 'expanding'
return unless prev.top + prev.height <= 0 return unless prev.top + prev.height <= 0