From 4ad054f87e15c174a1f6ad1adab2185ac6426412 Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Fri, 10 Jan 2025 14:00:40 +0800 Subject: [PATCH] Populating array with new items --- app/public/web.js | 10 ++-------- app/views/gallery.ejs | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/public/web.js b/app/public/web.js index b961bc5..226058d 100644 --- a/app/public/web.js +++ b/app/public/web.js @@ -25,13 +25,7 @@ class LGallery { https://www.lightgalleryjs.com/docs/settings/#licenseKey */ }, params.lgConfig)) - - // repeat the array for testing - let items = [] - for (let i = 0; i < 50; i++) { - items = items.concat(params.items) - } - this.items = items + this.items = params.items let timeout window.addEventListener('scroll', () => { @@ -52,7 +46,7 @@ class LGallery { } loadMoreItems () { - const numberOfItems = 20 + const numberOfItems = 100 if (this.index < this.items.length) { // Append thumbnails this.items diff --git a/app/views/gallery.ejs b/app/views/gallery.ejs index 9d0b31c..ee60da7 100644 --- a/app/views/gallery.ejs +++ b/app/views/gallery.ejs @@ -33,7 +33,7 @@