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.animations.slideDown.js.map Maven / Gradle / Ivy
{"version":3,"file":"slideDown.js","sourceRoot":"","sources":["../../src/animations/slideDown.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,SAAS,GAAG,CAAC,OAAoB,EAAE,EAAE;IAC1C,IAAI,cAAmC,EACtC,UAAkB,EAClB,aAAqB,EACrB,SAAiB,EACjB,YAAoB,EACpB,MAAc,CAAC;IAChB,IAAI,cAAsB,EACzB,gBAAwB,EACxB,mBAA2B,EAC3B,eAAuB,EACvB,kBAA0B,EAC1B,YAAoB,CAAC;IAEtB,MAAM,SAAS,GAAG,OAAO,CAAC;QACzB,WAAW,EAAE,GAAG,EAAE;YACjB,6CAA6C;YAC7C,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;YAEhC,sBAAsB;YACtB,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;YAC3C,UAAU,GAAG,UAAU,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YACnD,aAAa,GAAG,UAAU,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YACzD,SAAS,GAAG,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YACjD,YAAY,GAAG,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;YACvD,MAAM,GAAG,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAE3C,sBAAsB;YACtB,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;YACxC,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC;YAC5C,mBAAmB,GAAG,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC;YAClD,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC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KAAK,CAAC,UAAU,GAAG,gBAAgB,CAAC;QAC5C,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,mBAAmB,CAAC;QAClD,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,CAAC;QAC1C,OAAO,CAAC,KAAK,CAAC,YAAY,GAAG,kBAAkB,CAAC;QAChD,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,YAAY,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import animate, { duration } from \"./animate.js\";\n\nconst slideDown = (element: HTMLElement) => {\n\tlet computedStyles: CSSStyleDeclaration,\n\t\tpaddingTop: number,\n\t\tpaddingBottom: number,\n\t\tmarginTop: number,\n\t\tmarginBottom: number,\n\t\theight: number;\n\tlet storedOverflow: string,\n\t\tstoredPaddingTop: string,\n\t\tstoredPaddingBottom: string,\n\t\tstoredMarginTop: string,\n\t\tstoredMarginBottom: string,\n\t\tstoredHeight: string;\n\n\tconst animation = animate({\n\t\tbeforeStart: () => {\n\t\t\t// Show the element to measure its properties\n\t\t\telement.style.display = \"block\";\n\n\t\t\t// Get Computed styles\n\t\t\tcomputedStyles = getComputedStyle(element);\n\t\t\tpaddingTop = parseFloat(computedStyles.paddingTop);\n\t\t\tpaddingBottom = parseFloat(computedStyles.paddingBottom);\n\t\t\tmarginTop = parseFloat(computedStyles.marginTop);\n\t\t\tmarginBottom = parseFloat(computedStyles.marginBottom);\n\t\t\theight = parseFloat(computedStyles.height);\n\n\t\t\t// Store inline styles\n\t\t\tstoredOverflow = element.style.overflow;\n\t\t\tstoredPaddingTop = element.style.paddingTop;\n\t\t\tstoredPaddingBottom = element.style.paddingBottom;\n\t\t\tstoredMarginTop = element.style.marginTop;\n\t\t\tstoredMarginBottom = element.style.marginBottom;\n\t\t\tstoredHeight = element.style.height;\n\n\t\t\telement.style.overflow = \"hidden\";\n\t\t\telement.style.paddingTop = \"0\";\n\t\t\telement.style.paddingBottom = \"0\";\n\t\t\telement.style.marginTop = \"0\";\n\t\t\telement.style.marginBottom = \"0\";\n\t\t\telement.style.height = \"0\";\n\t\t},\n\t\tduration,\n\t\telement,\n\t\tadvance: progress => {\n\t\t\t// WORKAROUND\n\t\t\telement.style.display = \"block\";\n\t\t\t// END OF WORKAROUND\n\n\t\t\telement.style.paddingTop = `${(paddingTop * progress)}px`;\n\t\t\telement.style.paddingBottom = `${(paddingBottom * progress)}px`;\n\t\t\telement.style.marginTop = `${(marginTop * progress)}px`;\n\t\t\telement.style.marginBottom = `${(marginBottom * progress)}px`;\n\t\t\telement.style.height = `${(height * progress)}px`;\n\t\t},\n\t});\n\n\tanimation.promise().then(() => {\n\t\telement.style.overflow = storedOverflow;\n\t\telement.style.paddingTop = storedPaddingTop;\n\t\telement.style.paddingBottom = storedPaddingBottom;\n\t\telement.style.marginTop = storedMarginTop;\n\t\telement.style.marginBottom = storedMarginBottom;\n\t\telement.style.height = storedHeight;\n\t});\n\n\treturn animation;\n};\n\nexport default slideDown;\n"]}