diff --git a/package.json b/package.json index 5eca164..4b36445 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@leuffen/liscom-loader", - "version": "1.0.3", + "version": "1.0.4", "description": "", "main": "./dist/index.js", "module": "./dist/index.js", diff --git a/src/loader/_loader.scss b/src/loader/_loader.scss index d3d76d6..2c2233b 100755 --- a/src/loader/_loader.scss +++ b/src/loader/_loader.scss @@ -22,7 +22,7 @@ body { & > joda-content { opacity: 0; - transition: opacity 0.10s; + transition: opacity 0.25s; } &.loaded { @@ -36,7 +36,6 @@ body { body > .loader { - position: fixed; z-index: 99; top: 0; @@ -44,13 +43,14 @@ body > .loader { width: 100%; height: 100%; background: #fff; - transition: opacity 0.15s; + transition: opacity 0.45s; display: flex !important; align-items: center; align-content: center; justify-content: center; opacity: 1; + flex-wrap: wrap; flex-direction: column; diff --git a/src/loader/loader.ts b/src/loader/loader.ts index e37522f..e149f8b 100755 --- a/src/loader/loader.ts +++ b/src/loader/loader.ts @@ -12,7 +12,7 @@ export const hitIndex = parseInt(sessionStorage.getItem(indexName) ?? "0"); export function initLoader() { let interval = setInterval(() => { // Detect if body is loaded - if (document.querySelector("body")) { + if (document.body) { // Cancel interval clearInterval(interval);