@everymatrix/casino-game-page 1.27.0 → 1.27.2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-game-page",
3
- "version": "1.27.0",
3
+ "version": "1.27.2",
4
4
  "main": "dist/casino-game-page.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "f6ec9c7a552b5acad22390148d440b8050572424"
38
+ "gitHead": "0c03a79deed2ad6c051e5842c9c172ccdfee2b46"
39
39
  }
@@ -189,11 +189,8 @@
189
189
  break;
190
190
 
191
191
  case 'ModalClosed':
192
- if (!(integratedgameframedesktop == 'false') || isMobile(userAgent)) {
193
-
194
- window.postMessage({ type: 'EnableScroll'}, window.location.href);
192
+ if (integratedgameframedesktop === 'true' || isMobile(userAgent)) {
195
193
  // the timeout is necessary in order to sync with the closing of the modal frame and provide a smoother transition
196
-
197
194
  showModal = 'false';
198
195
 
199
196
  removeEventsToDisplayedElements();
@@ -203,6 +200,9 @@
203
200
  setTimeout(() => { detailsObtained = integratedgameframedesktop === "true";}, 500);
204
201
  }
205
202
  }
203
+ else if (integratedgameframedesktop === 'false' && e.data?.closeIntegratedGameFrameDesktop !== true) {
204
+ window.postMessage({ type: 'DisableScroll'}, window.location.href);
205
+ }
206
206
 
207
207
  break;
208
208
 
@@ -378,8 +378,6 @@
378
378
  } else if(gameState == 'true') {
379
379
  window.postMessage({ type: 'OpenIntegratedGameFrame', subVendor: game.subVendor, gameId: game.id, launchUrl: game.launchUrl?.href }, window.location.href);
380
380
  }
381
-
382
- window.postMessage({ type: 'EnableScroll'}, window.location.href);
383
381
  }
384
382
 
385
383
  const resizeHandler = ():void => {
@@ -396,11 +394,11 @@
396
394
 
397
395
  // End section: keep aspect ratio for iframe on resize
398
396
  const toggleLogin = ():void => {
399
- if (loginevent && integratedgameframedesktop == 'false' && !isMobile(userAgent)) {
400
- window.postMessage({ type: loginevent, transition: 'Login' }, window.location.href);
401
- } else if (loginevent) {
397
+ if (loginevent) {
398
+ if (isMobile(userAgent)) {
399
+ window.postMessage({ type: 'ModalClosed' }, window.location.href);
400
+ }
402
401
  window.postMessage({ type: loginevent, transition: 'Login' }, window.location.href);
403
- window.postMessage({ type: 'ModalClosed' }, window.location.href);
404
402
  }
405
403
 
406
404
  if (loginurl) {
@@ -417,11 +415,11 @@
417
415
  }
418
416
 
419
417
  const toggleRegister = ():void => {
420
- if (registerevent && integratedgameframedesktop == 'false' && !isMobile(userAgent)) {
421
- window.postMessage({ type: registerevent, transition: 'Register' }, window.location.href);
422
- } else if (registerevent) {
423
- window.postMessage({ type: registerevent, transition: 'Register' }, window.location.href);
424
- window.postMessage({ type: 'ModalClosed' }, window.location.href);
418
+ if (registerevent) {
419
+ if (isMobile(userAgent)) {
420
+ window.postMessage({ type: 'ModalClosed' }, window.location.href);
421
+ }
422
+ window.postMessage({ type: registerevent, transition: 'Register' }, windw.location.href);
425
423
  }
426
424
 
427
425
  if (registerurl) {