All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
package.dist.prod.util.isElementInView.js.map Maven / Gradle / Ivy
{
"version": 3,
"sources": ["../../../src/util/isElementInView.ts"],
"sourcesContent": ["/**\n * Determines if the element is within the viewport.\n * @param el {HTMLElement}\n */\nconst isElementInView = (el: HTMLElement) => {\n\tconst rect = el.getBoundingClientRect();\n\n\treturn (\n\t\trect.top >= 0 && rect.left >= 0\n\t\t\t&& rect.bottom <= (window.innerHeight || document.documentElement.clientHeight)\n\t\t\t&& rect.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t);\n};\n\nexport default isElementInView;\n"],
"mappings": "aAIA,MAAMA,EAAmBC,GAAoB,CAC5C,MAAMC,EAAOD,EAAG,sBAAsB,EAEtC,OACCC,EAAK,KAAO,GAAKA,EAAK,MAAQ,GAC1BA,EAAK,SAAW,OAAO,aAAe,SAAS,gBAAgB,eAC/DA,EAAK,QAAU,OAAO,YAAc,SAAS,gBAAgB,YAEnE,EAEA,eAAeF",
"names": ["isElementInView", "el", "rect"]
}