1"use strict"; 2 3class ImageCarouselRows extends elementorModules.frontend.handlers.CarouselBase { 4 getDefaultSettings() { 5 const settings = super.getDefaultSettings(); 6 settings.selectors.carousel = '.elementor-image-carousel-wrapper'; 7 return settings; 8 } 9 getSwiperSettings() { 10 const elementSettings = this.getElementSettings(), 11 slidesRows = +elementSettings.slides_rows || 2; 12 13 const swiperOptions = super.getSwiperSettings(); 14 swiperOptions.grid = { rows: slidesRows, fill: 'row', }; 15 16 //Set equal height to width for each image 17 if ('yes' === elementSettings.equal_width_height) { 18 swiperOptions.on = { 19 init: function() { 20 jQuery('.swiper .swiper-slide').each(function(){ 21 this.style.height = this.style.width; 22 }); 23 }, 24 } 25 jQuery(window).on('resize', function() { 26 setTimeout(function(){ 27 jQuery('.swiper .swiper-slide').each(function(){ 28 this.style.height = this.style.width; 29 }); 30 }, 200); 31 }); 32 } 33 34 return swiperOptions; 35 } 36} 37 38jQuery( window ).on( 'elementor/frontend/init', () => { 39 const addHandler = ( $element ) => { 40 elementorFrontend.elementsHandler.addHandler( ImageCarouselRows, { 41 $element, 42 } ); 43 }; 44 45 elementorFrontend.hooks.addAction( 'frontend/element_ready/image-carousel-rows.default', addHandler ); 46} );
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.