1(function( $ ) { 2 'use strict'; 3 4 var global_color = marvyScript.color.length != 0 ? [ ...marvyScript.color.custom_colors ,...marvyScript.color.system_colors ] : []; 5 6 var MarvyPureAnimation = { 7 initPure: function () { 8 elementorFrontend.hooks.addAction('frontend/element_ready/section', MarvyPureAnimation.initRipplesWidget); 9 elementorFrontend.hooks.addAction('frontend/element_ready/container', MarvyPureAnimation.initRipplesWidget); 10 }, 11 initRipplesWidget: function ($scope) { 12 var sectionId = $scope.data('id'); 13 var target = '.elementor-element-'+ sectionId; 14 var settings = {}; 15 16 if (window.isEditMode || window.elementorFrontend.isEditMode()) { 17 var editorElements = null; 18 var pureAnimationArgs = {}; 19 if (!window.elementor.hasOwnProperty('elements')) { 20 return false; 21 } 22 23 editorElements = window.elementor.elements; 24 if (!editorElements.models) { 25 return false; 26 } 27 28 $.each(editorElements.models, function (i, el) { 29 if (sectionId === el.id) { 30 pureAnimationArgs = el.attributes.settings.attributes; 31 } else if (el.id === $scope.closest('.elementor-top-section').data('id')) { 32 $.each(el.attributes.elements.models, function (i, col) { 33 $.each(col.attributes.elements.models, function (i, subSec) { 34 pureAnimationArgs = subSec.attributes.settings.attributes; 35 }); 36 }); 37 } 38 39 settings.switch = pureAnimationArgs.marvy_enable_flying_object; 40 settings.shape = pureAnimationArgs.marvy_flying_object_shape; 41 // settings.shapeColor = pureAnimationArgs.marvy_flying_object_shape_color; 42 43 if(Object.keys(pureAnimationArgs).length !== 0){ 44 // if(pureAnimationArgs.__globals__.marvy_flying_object_shape_color){ 45 if(pureAnimationArgs.__globals__ && pureAnimationArgs.__globals__.marvy_flying_object_shape_color && pureAnimationArgs.__globals__.marvy_flying_object_shape_color !== ""){ 46 var shapeColor_id = pureAnimationArgs.__globals__.marvy_flying_object_shape_color.split('=')[1]; 47 var shapeColor_arr = global_color.find(element => element._id === shapeColor_id); 48 settings.shapeColor = shapeColor_arr.color; 49 } 50 else{ 51 settings.shapeColor = pureAnimationArgs.marvy_flying_object_shape_color; 52 } 53 // } 54 55 } 56 }); 57 58 } else { 59 settings.switch = $scope.data("marvy_enable_flying_object"); 60 settings.shape = $scope.data("marvy_flying_object_shape"); 61 settings.shapeColor = $scope.data("marvy_flying_object_shape_color"); 62 } 63 if (settings.switch) { 64 pureAnimation(target, settings, sectionId); 65 } 66 } 67 }; 68 69 $( window ).on('elementor/frontend/init', MarvyPureAnimation.initPure); 70 71 function pureAnimation(target,settings,sectionId) { 72 var checkElement = document.getElementsByClassName("marvy-pure-animation-shape-"+sectionId); 73 if (checkElement.length <= 0 ) { 74 var i; 75 var pure_ul_el = document.createElement('ul'); 76 pure_ul_el.classList.add("marvy-pure-animation-shape-"+sectionId); 77 78 document.querySelector(target).appendChild(pure_ul_el); 79 document.querySelector(target).classList.add('marvy-custom-pure-animation-section-'+sectionId); 80 81 var zIndex = document.querySelector('.marvy-custom-pure-animation-section-'+sectionId+' .elementor-container , .marvy-custom-pure-animation-section-'+sectionId+'>*'); 82 zIndex.style.zIndex = '99'; 83 84 var pureMinHeight = document.querySelector(".elementor-element-"+sectionId); 85 pureMinHeight.closest('.elementor-top-section,.e-con-boxed,.e-con-full').style.minHeight = "100px"; 86 87 for(i=1; i <= 15; i++) { 88 var pure_li_el = document.createElement('li'); 89 document.querySelector('.marvy-pure-animation-shape-'+sectionId).appendChild(pure_li_el); 90 } 91 92 var pureShapeColor = document.querySelectorAll('.marvy-pure-animation-shape-'+sectionId+' li'); 93 var purePercentage = '5px' ; 94 95 if (settings.shape === 'circle' ) { 96 purePercentage = '50%'; 97 } else { 98 purePercentage = '5px'; 99 } 100 101 for (i = 0; i < pureShapeColor.length; i++) { 102 pureShapeColor[i].style.backgroundColor = settings.shapeColor; 103 pureShapeColor[i].style.borderRadius = purePercentage; 104 } 105 } 106 } 107})( jQuery ); 108
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.