Skip to Content

JavaScript File

URL: https://static.tildacdn.com/js/tilda-zero-scale-1.0.min.js
HTTP Status: 200 OK
MIME Type: application/javascript
Last Modified: Thu, 19 Jan 2023 08:14:12 GMT
Download Time: Less than a second
Cookies: None
Size: 6 KB
HTTP Headers:  9 headers
Links In:  1 pages
OK Issues: No issues found

1function t396_scaleBlock(e){var t,o,w=t396_isOnlyScalableBrowser(),u=t396_detectResolution(e),l=document.getElementById("rec"+e),_=l?l.querySelectorAll(".t396__elem"):[],f=l?l.querySelector(".t396__artboard"):null;f&&(o=f.clientWidth,t=t396_ab__getFieldValue(f,"height"),l=Math.floor(t*window.tn_scale_factor),t=t396_ab__getFieldValue(f,"height_vh"),window.tn_scale_offset=(o*window.tn_scale_factor-o)/2,t&&(o=t396_ab__getFieldValue(f,"height"),l=(t=t396_ab__getHeight(f))<=(o=o*window.tn_scale_factor)?o:t),f.classList.add("t396__artboard_scale"),l='<style class="t396__scale-style">.t-rec#rec'+e+" { overflow: visible; }

2#rec"+e+" .t396__carrier,#rec"+e+" .t396__filter,#rec"+e+" .t396__artboard {height: "+l+"px !important;width: 100vw !important;max-width: 100%;}

3</style>",f.insertAdjacentHTML("beforeend",l)),Array.prototype.forEach.call(_,function(e){var t=e.querySelector(".tn-atom"),o=t396_elem__getFieldValue(e,"container"),l=e.getAttribute("data-elem-type");if("grid"===o)if(w){t&&(d=t.parentNode,(m=document.createElement("div")).classList.add("tn-atom__scale-wrapper"),m.style.transform="scale("+window.tn_scale_factor+")",d&&d.removeChild(t),m.appendChild(t),d&&d.appendChild(m)),"none"===e.style.backdropFilter&&(e.style.backdropFilter="");var _=getComputedStyle(e).backdropFilter;_&&t&&m&&(e.style.backdropFilter="none",m.style.backdropFilter=_);var a=e.querySelector(".t-bgimg");a&&"fixed"===window.getComputedStyle(a).backgroundAttachment&&(e.removeChild(a.parentNode),e.appendChild(a),s=t396_elem__getFieldValue(e,"height"),s=t396_elem__getHeight(e,s),s=t396_elem__convertPosition__Local__toAbsolute(e,"height",s),n=t396_elem__getFieldValue(e,"width"),n=t396_elem__getWidth(e,n),n=t396_elem__convertPosition__Local__toAbsolute(e,"width",n),c=parseFloat(t396_elem__getFieldValue(e,"top")),p=parseFloat(t396_elem__getFieldValue(e,"left")),e.style.top=c*window.tn_scale_factor+"px",e.style.left=p*window.tn_scale_factor+"px",e.style.height=s*window.tn_scale_factor+"px",e.style.width=n*window.tn_scale_factor+"px",e.setAttribute("data-scale-off","yes"))}

4else{e.style.zoom=window.tn_scale_factor;_=/Macintosh/.test(navigator.userAgent)&&"ontouchend"in document&&744<=screen.width;"text"===l&&_&&(t.style.removeProperty("font-size"),e.style.removeProperty("zoom"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("width"),r=parseInt(window.getComputedStyle(t).fontSize,10),n=t396_elem__getFieldValue(e,"width"),n=t396_elem__getWidth(e,n),n=t396_elem__convertPosition__Local__toAbsolute(e,"width",n),c=parseFloat(t396_elem__getFieldValue(e,"top")),c=t396_elem__convertPosition__Local__toAbsolute(e,"top",c),p=parseFloat(t396_elem__getFieldValue(e,"left")),p=t396_elem__convertPosition__Local__toAbsolute(e,"left",p),t.style.fontSize=r*window.tn_scale_factor+"px",e.style.top=c*window.tn_scale_factor+"px",e.style.left=p*window.tn_scale_factor+"px",e.style.width=n*window.tn_scale_factor+"px",e.setAttribute("data-scale-off","yes")),"button"===l&&_&&!t.classList.contains("t396_manual-scaled-text")&&(e.style.removeProperty("zoom"),i=window.getComputedStyle(t),r=parseInt(i.fontSize,10),t.classList.add("t396_manual-scaled-text"),t.style.fontSize=r*window.tn_scale_factor+"px",e.style.zoom=window.tn_scale_factor);var a=e.querySelector("iframe"),_=e.getAttribute("data-animate-style"),i=e.getAttribute("data-animate-sbs-event"),r=f.classList.contains("t396_resizechange");if(a&&!_&&!i&&!r){e.style.removeProperty("zoom");var s=t396_elem__getFieldValue(e,"height");s=t396_elem__getHeight(e,s),s=t396_elem__convertPosition__Local__toAbsolute(e,"height",s);var n=t396_elem__getFieldValue(e,"width");n=t396_elem__getWidth(e,n),n=t396_elem__convertPosition__Local__toAbsolute(e,"width",n);var c=parseFloat(t396_elem__getFieldValue(e,"top"));c=t396_elem__convertPosition__Local__toAbsolute(e,"top",c),c*=window.tn_scale_factor,c+=(s*window.tn_scale_factor-s)/2;var d,m,p=parseFloat(t396_elem__getFieldValue(e,"left"));for(p=t396_elem__convertPosition__Local__toAbsolute(e,"left",p),p*=window.tn_scale_factor,p+=(n*window.tn_scale_factor-n)/2,e.style.top=c+"px",e.style.left=p+"px",(d=t.parentNode)&&d.classList.contains("tn-atom__scale-wrapper")&&(d=d.parentNode),(m=document.createElement("div")).classList.add("tn-atom__scale-wrapper"),m.style.transform="scale("+window.tn_scale_factor+")";d.firstChild;)d.removeChild(d.firstChild);m.appendChild(t),d&&d.appendChild(m),e.setAttribute("data-scale-off","yes")}

5"shape"===l&&(s=t396_elem__getFieldValue(e,"height"),s=t396_elem__getHeight(e,s),s=t396_elem__convertPosition__Local__toAbsolute(e,"height",s),n=t396_elem__getFieldValue(e,"width"),n=t396_elem__getWidth(e,n),n=t396_elem__convertPosition__Local__toAbsolute(e,"width",n),c=parseFloat(t396_elem__getFieldValue(e,"top")),c=t396_elem__convertPosition__Local__toAbsolute(e,"top",c),p=parseFloat(t396_elem__getFieldValue(e,"left")),p=t396_elem__convertPosition__Local__toAbsolute(e,"left",p),l=(m=window.getComputedStyle(t)).borderWidth,m="none"!==m.backgroundImage,_=e.getAttribute("data-animate-sbs-event"),!(s<=2||n<=2)||"0px"!==l||m||_||(e.style.removeProperty("zoom"),n=n*window.tn_scale_factor,s=s*window.tn_scale_factor,c=c*window.tn_scale_factor,p=p*window.tn_scale_factor,e.style.width=parseFloat(n)+"px",e.style.height=parseFloat(s)+"px",e.style.top=Math.round(c)+"px",e.style.left=Math.round(p)+"px",e.setAttribute("data-scale-off","yes"))),"text"===e.getAttribute("data-elem-type")&&u<1200&&t&&(t.style.webkitTextSizeAdjust="auto"),t&&(t.style.transformOrigin="center")}

6}

7)}

8window.t396_initialScale||(window.t396_initialScale=function(){}

9);