Improve performances when expanding all images and they were already loaded.
This commit is contained in:
parent
d4a0af9e21
commit
53ab332406
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user