Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/themify-builder/js/modules/sticky.min.js
Назад
((s,d)=>{"use strict";let i,o=!1,f=s.w,b=s.h,t=!1;const h=new Map,e="m"===tbLocalScript.is_sticky&&parseInt(tbLocalScript.breakpoints.tablet[1]),l=e=>{!0!==o&&requestAnimationFrame(()=>{const s=d.scrollY,t=e||h;for(let e of t){let l=e[0],n=e[1],t=l.classList.contains("tb_sticky_scroll_active");if("disable"!==n)if(!0===n.isBottom&&s+b>=n.space||!0!==n.isBottom&&s>n.space){let o=l.style;if(!1===t&&(l.parentNode.style.height=n.h+"px",o.position="fixed",o.top=n.value,o.width=n.w+"px",l.classList.add("tb_sticky_scroll_active")),n.unstick&&n.unstick.item){let t=n.unstick,e=parseInt(n.value),s=t.item.getBoundingClientRect(),i;"builder"===t.type?i=s.bottom-n.h-e:(i="passes"===t.r?s.bottom-e:s.top-n.h-e,"top"!==t.cur&&"bottom"!==t.cur||(i+=t.v,"bottom"===t.cur&&(i-=b))),i=i<0?i+e+"px":n.value,n.currentTop!==i&&(n.currentTop=i,h.set(l,n),o.top=i)}}else!0===t&&u(l)}})},u=t=>{const e=t.style;e.width=e.top=e.bottom=e.position=t.parentNode.style.height="",t.classList.remove("tb_sticky_scroll_active")},n=new MutationObserver(e=>{if(e[0]){let t=e[0].target.closest("[data-sticky-active]");t&&(i&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{s.imagesLoad(t).then(t=>{const e=new Map;u(t),c(t),e.set(t,h.get(t)),l(e),i=null})}))}}),c=(i,e,t)=>{const s=i.classList.contains("tb_sticky_scroll_active");if(!1===s||!0===t){if(!h.has(i)||!0===t){const l=(o=>{let l=!1,n=tbLocalScript.breakpoints;for(let t=Object.keys(n),i=t.length-1;-1<i;--i){let e=t[i],s="tablet_landscape"===e?"tl":e[0];if(void 0!==o[s]){let t="mobile"!==e?n[e][1]:n[e];if(t>=f){l=o[s];break}}}return l=!1===l?o.d:l})(JSON.parse(i.getAttribute("data-sticky-active")));if(!l)return h.set(i,"disable"),void u(i);const n=l.stick||{},c=n.v?parseInt(n.v):0,a=l.unstick,r=n.u||"px";if("px"!==r?l.u=r:l.value=c+r,l.v=c,"bottom"===n.p&&(l.isBottom=!0),a){let e,s=i.closest(".themify_builder_content");if("builder"===a.type){let t=s.closest("#tbp_header");(t=t&&(null!==(t=document.tfId("tbp_content"))?t.tfClass("themify_builder_content")[0]:document.tfClass("themify_builder_content")[1]))&&(s=t),e=s}else(e=(e="row"===a.type?s.tfClass("tb_"+a.el)[0]:e)||s.tfClass("tb_"+a.el)[0])&&(a.v=parseInt(a.v));e&&(a.item=e)}if(!i.parentNode.classList.contains("tb_sticky_wrapper")){const p=document.createElement("div");p.className="tb_sticky_wrapper",i.before(p),p.appendChild(i)}h.set(i,l)}const o=h.get(i);if("disable"!==o){!0===s&&(i.style.position=""),e||(i.style.width="",e=i.getBoundingClientRect()),o.w=0<e.width?e.width:i.offsetWidth,o.h=0<e.height?e.height:i.offsetHeight;let t=o.v;"%"===o.u&&0!==t&&(t=t/100*b),!0===o.isBottom&&(t=b-t-o.h),o.value=t+"px",o.space=void 0!==o.isBottom?e.bottom+d.pageYOffset+t:e.top+d.pageYOffset-t,o.t=e.top,i.parentNode.style.height!==o.h+"px"&&(i.parentNode.style.height=o.h+"px"),!0===s&&(i.style.position="fixed"),h.set(i,o)}}},a=new IntersectionObserver((e,t)=>{for(let t=e.length-1;-1<t;--t)!0===e[t].isIntersecting&&c(e[t].target,e[t].boundingClientRect)},{threshold:[.3,.4,.5,.6,.7,.8,.9,1]});s.on("tb_sticky_init",e=>{for(let t=e.length-1;-1<t;--t)a.observe(e[t]),n.observe(e[t],{subtree:!0,childList:!0});if(!1===t){if(t=!0,0<d.scrollY){for(let t=e.length-1;-1<t;--t)c(e[t],e[t].getBoundingClientRect());l()}d.tfOn("scroll",t=>{l()},{passive:!0})}}).on("tfsmartresize",t=>{if(t){f=t.w,b=t.h,o=!!(e&&e>=f);for(let t of h)!0===o?u(t[0]):c(t[0],null,!0);!1===o&&l()}})})(Themify,window);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка