PageSourceSearch

https://www.roma212.com/wp-content/themes/floka/elements/assets/js/circle-text.js?ver=1.0.2

js roma212.com collected 2026-10-04 17:07:40 UTC 2,842 bytes, 86 lines download raw bytes

1( function( $ ) {
2    "use strict";
3    
4    let circleInstances = [];
5    
6    function initCircleText($scope) {
7        let elements = $scope.find('.pxl-circle-text-item');
8        if(!elements.length) return;
9        
10        circleInstances.forEach(instance => {
11            if (instance && typeof instance.destroy === 'function') {
12                instance.destroy();
13            }
14        });
15        circleInstances = [];
16        
17        setTimeout(function() {
18            elements.each(function() {
19                let circletext = new CircleType(this);
20                circletext.forceHeight(true) 
21                         .forceWidth(true);
22                
23                circleInstances.push(circletext);
24            });
25        }, 300);
26    }
27    
28    function initScrollAnimation($scope) {
29        gsap.registerPlugin(ScrollTrigger);
30        setTimeout(function() {
31            document.querySelectorAll('.spin-scroll').forEach(wrapper => {
32              const textCircle = $('.pxl-circle-text-item,.pxl-img-spin'); 
33              if (!textCircle) return;
34              gsap.to(textCircle, {
35                rotate: 360,
36                ease: "none",
37                scrollTrigger: {
38                  trigger: wrapper, 
39                  start: "top bottom",
40                  end: "bottom top",
41                  scrub: true,
42              }
43          });
44          });
45        }, 300);
46    }
47    
48    var pxl_circilar_text_handler = function( $scope ) {
49        initCircleText($scope);
50        
51        initScrollAnimation($scope);
52        
53        $scope.find('.pxl-anchor-button').off('click.circleText').on('click.circleText', function(e) {
54            e.preventDefault();
55            
56            initCircleText($scope);
57            
58            if (typeof ScrollTrigger !== 'undefined') {
59                ScrollTrigger.refresh();
60            }
61            
62        });
63        
64        $(document).off('click.circleTextGlobal', '.pxl-anchor-button').on('click.circleTextGlobal', '.pxl-anchor-button', function(e) {
65            e.preventDefault();
66            
67            let $currentScope = $(this).closest('[data-element_type="pxl_circle_text.default"]');
68            if (!$currentScope.length) {
69                $currentScope = $(document);
70            }
71            
72            initCircleText($currentScope);
73            
74            if (typeof ScrollTrigger !== 'undefined') {
75                ScrollTrigger.refresh();
76            }
77            
78        });
79    };
80    
81    $( window ).on( 'elementor/frontend/init', function() {
82        elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_circle_text.default', function( $scope ) {
83            pxl_circilar_text_handler($scope);
84        });
85    } );
86} )( 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.