1(function ($) { 2 3 "use strict"; 4 5 $(window).on("elementor/frontend/init", function () { 6 7 if (typeof elementorModules === "undefined") { 8 return; 9 } 10 11 var RipplesEffectHandler = elementorModules.frontend.handlers.Base.extend({ 12 13 dropInterval: null, 14 15 bindEvents: function () { 16 this.run(); 17 }, 18 19 getFxVal: function (setting) { 20 return this.getElementSettings(setting); 21 }, 22 23 destroyRipples: function ($element) { 24 25 if (this.dropInterval) { 26 clearInterval(this.dropInterval); 27 this.dropInterval = null; 28 } 29 30 try { 31 if ($element.data("ripples")) { 32 $element.ripples("destroy"); 33 } 34 } catch (e) {} 35 }, 36 37 run: function () { 38 39 var $element = this.$element; 40 41 this.destroyRipples($element); 42 43 if (!$element.hasClass("xpro-ripples-effect-enabled")) { 44 return; 45 } 46 47 if (typeof $.fn.ripples === "undefined") { 48 return; 49 } 50 51 var resolution = this.getFxVal("xpro_ripples_resolution.size") || 256, 52 dropRadius = this.getFxVal("xpro_ripples_drop_radius.size") || 20, 53 perturbance = this.getFxVal("xpro_ripples_perturbance.size") || 0.03, 54 interactive = this.getFxVal("xpro_ripples_interactive") === "yes", 55 autoDrops = this.getFxVal("xpro_ripples_auto_drops") === "yes", 56 interval = this.getFxVal("xpro_ripples_auto_drops_interval") || 1000; 57 58 try { 59 60 $element.ripples({ 61 resolution: resolution, 62 dropRadius: dropRadius, 63 perturbance: perturbance, 64 interactive: interactive 65 }); 66 67 var data = $element.data("ripples"); 68 69 if (data && data.$canvas) { 70 data.$canvas.addClass("xpro-ripples-container"); 71 } 72 73 if (autoDrops) { 74 75 this.dropInterval = setInterval(function () { 76 77 if (!$element.is(":visible")) { 78 return; 79 } 80 81 if ($element.data("ripples")) { 82 83 var x = Math.random() * $element.outerWidth(), 84 y = Math.random() * $element.outerHeight(), 85 r = Math.random() * 20 + 5, 86 s = 0.03 + Math.random() * 0.05; 87 88 $element.ripples("drop", x, y, r, s); 89 } 90 91 }, interval); 92 } 93 94 } catch (e) { 95 96 console.error("Xpro Ripples Error:", e.message); 97 } 98 } 99 }); 100 101 var addRipplesHandler = function ($element) { 102 103 elementorFrontend.elementsHandler.addHandler( 104 RipplesEffectHandler, 105 { $element: $element } 106 ); 107 }; 108 109 elementorFrontend.hooks.addAction( 110 "frontend/element_ready/widget", 111 addRipplesHandler 112 ); 113 114 elementorFrontend.hooks.addAction( 115 "frontend/element_ready/section", 116 addRipplesHandler 117 ); 118 119 elementorFrontend.hooks.addAction( 120 "frontend/element_ready/column", 121 addRipplesHandler 122 ); 123 124 elementorFrontend.hooks.addAction( 125 "frontend/element_ready/container", 126 addRipplesHandler 127 ); 128 129 }); 130 131})(jQuery);
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.