mirror of
https://github.com/TangentFoxy/memex.git
synced 2024-11-22 04:54:23 +00:00
Add setting for masonry layout reload on image load progress.
This commit is contained in:
parent
ae855de9b2
commit
4873154fe3
@ -3956,3 +3956,9 @@ WITH LOVE FROM VERY SMALL PLACES
|
||||
AUTH : kodedninja
|
||||
TAGS : ambient, calm
|
||||
LINK : https://0x22.bandcamp.com/album/with-love-from-very-small-places
|
||||
|
||||
LIGHTING FIRES POETICS AND SENSATION
|
||||
PERS : Phil James
|
||||
AUTH : Phil James
|
||||
LINK : https://medium.com/@shinestrength/lighting-fires-poetics-and-sensation-991d083e15e9
|
||||
FILE : 12018-10-31_lightingFires.pdf
|
@ -4,6 +4,8 @@ const SETTINGS =
|
||||
STATSNUMTYPE: 10,
|
||||
WIDEGRIDITEM: true,
|
||||
USEMASONRY: true,
|
||||
MASONRYCOMPLETE: true,
|
||||
MASONRYPROGRESS: true,
|
||||
GRIDITEMIDBASE: 'item',
|
||||
SHOWUPPER: true,
|
||||
SHOWTITLE: true,
|
||||
@ -16,7 +18,7 @@ const SETTINGS =
|
||||
SHOWNOTE: true,
|
||||
SHOWQOTE: true,
|
||||
SHOWTERM: true,
|
||||
SHOWDONE: false,
|
||||
SHOWDONE: true,
|
||||
SHOWPROG: true,
|
||||
SHOWIMAG: true,
|
||||
SHOWFILE: true,
|
||||
|
@ -50,13 +50,22 @@ function View()
|
||||
{
|
||||
this.msnry.reloadItems();
|
||||
this.msnry.layout();
|
||||
}
|
||||
|
||||
if (SETTINGS.MASONRYCOMPLETE || SETTINGS.MASONRYPROGRESS)
|
||||
{
|
||||
let imgLoad = imagesLoaded( container );
|
||||
if (SETTINGS.MASONRYCOMPLETE)
|
||||
{
|
||||
// When all images finish: redo mansonry layout
|
||||
imgLoad.on( 'always', function() { parent.msnry.layout(); } );
|
||||
}
|
||||
if (SETTINGS.MASONRYPROGRESS)
|
||||
{
|
||||
// As images load one by one: redo masonry layout
|
||||
// imgLoad.on( 'progress', function() { parent.msnry.layout(); } );
|
||||
imgLoad.on( 'progress', function() { parent.msnry.layout(); } );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.buildEntry = function(db, key)
|
||||
|
Loading…
Reference in New Issue
Block a user