1/*1790588016000*/ 2/** 3 * Gestiona el comportamiento del componente Presentación cuando tiene imagen: 4 * oculta el gradiente inferior cuando el contenido no tiene overflow o se ha 5 * llegado al final del scroll. 6 * 7 * La clase de estado se aplica al contenedor .um-presentacion--with-image 8 * porque el gradiente está posicionado en él, no en __right. 9 */ 10(() => { 11 const SELECTOR = '.um-presentacion--with-image .um-presentacion__right'; 12 const CLASS_SCROLL_END = 'um-presentacion--scroll-end'; 13 14 function update(el) { 15 const atBottom = el.scrollHeight - el.scrollTop <= el.clientHeight + 2; 16 const component = el.closest('.um-presentacion--with-image'); 17 if (component) { 18 component.classList.toggle(CLASS_SCROLL_END, atBottom); 19 } 20 } 21 22 function init() { 23 document.querySelectorAll(SELECTOR).forEach(el => { 24 el.addEventListener('scroll', () => update(el), { passive: true }); 25 window.addEventListener('resize', () => update(el), { passive: true }); 26 update(el); // estado inicial 27 }); 28 } 29 30 if (document.readyState === 'loading') { 31 document.addEventListener('DOMContentLoaded', init); 32 } else { 33 init(); 34 } 35})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.