diff --git a/docs/assets/main.js b/docs/assets/main.js index 8316ddf..857d4ef 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -115,14 +115,15 @@ document.getElementById("pixlInput").onchange = function(e) { //function to apply effects const pixelit = ()=>{ document.querySelector('.loader').classList.toggle('active'); + setTimeout(() => { + document.querySelector('.loader').classList.toggle('active'); + }, 500); px.setScale(blocksize.value).setPalette(paletteList[currentPalette]).draw().pixelate(); greyscale.checked ? px.convertGrayscale() : null; palette.checked ? px.convertPalette() : null; maxheight.value ? px.setMaxHeight(maxheight.value).resizeImage() : null; maxwidth.value ? px.setMaxWidth(maxwidth.value).resizeImage() : null; - setTimeout(() => { - document.querySelector('.loader').classList.toggle('active'); - }, 250); + } diff --git a/docs/assets/mainmin.js b/docs/assets/mainmin.js index 06af208..385b5cd 100644 --- a/docs/assets/mainmin.js +++ b/docs/assets/mainmin.js @@ -29,14 +29,15 @@ document.addEventListener("DOMContentLoaded", function () { var pixelit = function pixelit() { document.querySelector('.loader').classList.toggle('active'); + setTimeout(function () { + document.querySelector('.loader').classList.toggle('active'); + }, 500); px.setScale(blocksize.value).setPalette(paletteList[currentPalette]).draw().pixelate(); greyscale.checked ? px.convertGrayscale() : null; palette.checked ? px.convertPalette() : null; maxheight.value ? px.setMaxHeight(maxheight.value).resizeImage() : null; maxwidth.value ? px.setMaxWidth(maxwidth.value).resizeImage() : null; - setTimeout(function () { - document.querySelector('.loader').classList.toggle('active'); - }, 250); + }; var makePaletteGradient = function makePaletteGradient() { diff --git a/docs/index.html b/docs/index.html index 16ec493..36b6b9e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -16,6 +16,7 @@

Pixel it

try it examples Documentation + github @@ -139,7 +140,7 @@

Known Problems/bugs