@everymatrix/casino-games-category-section 0.0.264 → 0.0.265

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": "0.0.264",
3
+ "version": "0.0.265",
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": "74280a3d32c0dd5df0429675910c1fec53f2aa81"
39
+ "gitHead": "90b1bab32edc865bbff30a158a011715e91a5799"
40
40
  }
@@ -25,6 +25,7 @@
25
25
  export let categoryindex:number = 0;
26
26
  export let categorygames:number = 0;
27
27
  export let livecasino:string = 'false';
28
+ export let visiblegames:string = '';
28
29
 
29
30
  export let once = true;
30
31
  export let top = 0;
@@ -277,7 +278,6 @@
277
278
  searchItem = false;
278
279
  mostPlayedScreen = false;
279
280
  validObservers = false;
280
-
281
281
  if (e.data.receivedFavoriteResults) {
282
282
  favoriteGames = e.data.receivedFavoriteResults.items;
283
283
  }
@@ -314,6 +314,13 @@
314
314
  });
315
315
  shownCategoryData = categoryData.games.items;
316
316
  showLoadCategory = false;
317
+ // @TODO: replace this quick fix - when there are only a few category games, the view scrolls to the footer
318
+ if(shownCategoryData.length < 10) {
319
+ scrollTop = true;
320
+ setTimeout(() => {
321
+ window.postMessage({ type: 'WidgetTopReference', scrollTop }, window.location.href);
322
+ }, 500);
323
+ }
317
324
  });
318
325
  break;
319
326
 
@@ -321,10 +328,17 @@
321
328
  searched = false;
322
329
  mostPlayedScreen = false;
323
330
  lobbyView = true;
331
+
332
+ // fallback for when the categoryData is undefined (fix for on reload issue)
333
+ if(!categoryData) {
334
+ window.postMessage({ type: `CategoryData_${categoryid}`, categoryId: {categoryid}, visiblegames }, window.location.href);
335
+ }
336
+
324
337
  shownCategoryData = categoryData.games.items;
325
338
  shownCategoryData.forEach((item:any) => {
326
339
  item.isFavorite = checkFavorite(item.id);
327
340
  });
341
+
328
342
  showLoadCategory = true;
329
343
  break;
330
344