mirror of
https://github.com/TangentFoxy/memex.git
synced 2024-11-22 04:54:23 +00:00
Refactor masonry re-layout settings.
This commit is contained in:
parent
4873154fe3
commit
f5fe267ba9
@ -4,7 +4,6 @@ const SETTINGS =
|
||||
STATSNUMTYPE: 10,
|
||||
WIDEGRIDITEM: true,
|
||||
USEMASONRY: true,
|
||||
MASONRYCOMPLETE: true,
|
||||
MASONRYPROGRESS: true,
|
||||
GRIDITEMIDBASE: 'item',
|
||||
SHOWUPPER: true,
|
||||
|
@ -54,12 +54,12 @@ function View()
|
||||
if (SETTINGS.MASONRYCOMPLETE || SETTINGS.MASONRYPROGRESS)
|
||||
{
|
||||
let imgLoad = imagesLoaded( container );
|
||||
if (SETTINGS.MASONRYCOMPLETE)
|
||||
if (!SETTINGS.MASONRYPROGRESS)
|
||||
{
|
||||
// When all images finish: redo mansonry layout
|
||||
imgLoad.on( 'always', function() { parent.msnry.layout(); } );
|
||||
}
|
||||
if (SETTINGS.MASONRYPROGRESS)
|
||||
else
|
||||
{
|
||||
// As images load one by one: redo masonry layout
|
||||
imgLoad.on( 'progress', function() { parent.msnry.layout(); } );
|
||||
|
Loading…
Reference in New Issue
Block a user