diff --git a/frontend/src/ketr-photos/ketr-photos.html b/frontend/src/ketr-photos/ketr-photos.html index 52af49c..f6f32d5 100755 --- a/frontend/src/ketr-photos/ketr-photos.html +++ b/frontend/src/ketr-photos/ketr-photos.html @@ -392,6 +392,16 @@ this.thumbnails[index].visible = false; }.bind(this)); + /* Randomly index the visible array, keeping the center + * in the middle. This makes the loading look more organic. */ + for (var i = 0, j = visible.length - 1; i < j; i++, j--) { + if (Math.random() > 0.5) { + var tmp = visible[i]; + visible[i] = visible[j]; + visible[j] = tmp; + } + } + /* Turn on visibility for any item that is now visible */ visible.forEach(function(index) { if (this.thumbnails[index].visible != true) {