@everymatrix/casino-games-category-section 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-games-category-section",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"main": "dist/casino-games-category-section.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "15df0a4bc1195017b7df65675dfd40261b5dbe8b"
|
|
40
40
|
}
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
/* Start Lazy Loading */
|
|
74
74
|
let nativeLoading:boolean = true;
|
|
75
75
|
let intersecting:boolean = false;
|
|
76
|
+
let isLazyLoading:boolean = false;
|
|
76
77
|
let container:any;
|
|
77
78
|
let maxTotal:number;
|
|
78
79
|
let categoryName:HTMLElement;
|
|
@@ -452,6 +453,7 @@
|
|
|
452
453
|
// @TODO categoryId type fix
|
|
453
454
|
const loadMoreGames = (categoryId:any) => {
|
|
454
455
|
limit += 1;
|
|
456
|
+
isLazyLoading = true;
|
|
455
457
|
|
|
456
458
|
if (limit <= maxTotal) {
|
|
457
459
|
getData(categoryId, offset, limit).then((res:any) => {
|
|
@@ -468,6 +470,7 @@
|
|
|
468
470
|
item.isFavorite = checkFavorite(item.id);
|
|
469
471
|
});
|
|
470
472
|
}
|
|
473
|
+
isLazyLoading = false;
|
|
471
474
|
});
|
|
472
475
|
}
|
|
473
476
|
}
|
|
@@ -697,7 +700,7 @@
|
|
|
697
700
|
{/if}
|
|
698
701
|
</div>
|
|
699
702
|
{/if}
|
|
700
|
-
{#if isLoading}
|
|
703
|
+
{#if isLoading && !isLazyLoading}
|
|
701
704
|
<div class="lds-dual-ring" part="lds-dual-ring"></div>
|
|
702
705
|
{:else}
|
|
703
706
|
{#if shownCategoryData.length !== 0}
|
|
@@ -753,7 +756,7 @@
|
|
|
753
756
|
{/if}
|
|
754
757
|
|
|
755
758
|
<ul class="{(favoriteGamesData.items.length != 0) ? 'CasinoGamesGrid' : ''} 'GamesListIncreasedGap'}" part="{(favoriteGamesData.items.length != 0) ? 'CasinoGamesGrid' : ''} 'GamesListIncreasedGap'}" bind:this={container}>
|
|
756
|
-
{#if isLoading}
|
|
759
|
+
{#if isLoading && !isLazyLoading}
|
|
757
760
|
<div class="lds-dual-ring" part="lds-dual-ring"></div>
|
|
758
761
|
{:else}
|
|
759
762
|
{#if favoriteGamesData}
|