PageSourceSearch

https://www.bharatiptv.com/wp-content/plugins/ienet-addon/assets/v…/jquery.circleType.js?ver=1755493902

js bharatiptv.com collected 2026-10-04 02:35:53 UTC 5,699 bytes, 155 lines download raw bytes

1/*
2 * CircleType 0.34
3 * Peter Hrynkow
4 * Copyright 2013, Licensed GPL & MIT
5 *
6*/
7
8(function($){
9    $.fn.circleType = function(options) {
10
11        var settings = {
12            dir: 1,
13            position: 'relative'
14        };
15        if (typeof($.fn.lettering) !== 'function') {
16            console.log('Lettering.js is required');
17            return;
18        }
19        return this.each(function () {
20        
21            if (options) { 
22                $.extend(settings, options);
23            }
24            var elem = this, 
25                delta = (180 / Math.PI),
26                ch = parseInt($(elem).css('line-height'), 10),
27                fs = parseInt($(elem).css('font-size'), 10),
28                txt = elem.innerHTML.replace(/^\s+|\s+$/g, '').replace(/\s/g, ' '),
29                letters, 
30                center;
31            
32            elem.innerHTML = txt
33            $(elem).lettering();
34
35            elem.style.position =  settings.position;
36
37            letters = elem.getElementsByTagName('span');
38            center = Math.floor(letters.length / 2)
39                    
40            var layout = function () {
41                var tw = 0, 
42                    i,
43                    offset = 0,
44                    minRadius, 
45                    origin, 
46                    innerRadius,
47                    l, style, r, transform;
48                                                    
49                for (i = 0; i < letters.length; i++) {
50                    tw += letters[i].offsetWidth;
51                }
52                minRadius = (tw / Math.PI) / 2 + ch;
53                
54                if (settings.fluid && !settings.fitText) {
55                    settings.radius = Math.max(elem.offsetWidth / 2, minRadius);
56                }    
57                else if (!settings.radius) {
58                    settings.radius = minRadius;
59                }   
60                
61                if (settings.dir === -1) {
62                    origin = 'center ' + (-settings.radius + ch) / fs + 'em';
63                } else {
64                    origin = 'center ' + settings.radius / fs + 'em';
65                }
66
67                innerRadius = settings.radius - ch;
68                    
69                for (i = 0; i < letters.length; i++) {
70                    l = letters[i];
71                    offset += l.offsetWidth / 2 / innerRadius * delta;
72                    l.rot = offset;                      
73                    offset += l.offsetWidth / 2 / innerRadius * delta;
74                }   
75                for (i = 0; i < letters.length; i++) {
76                    l = letters[i]
77                    style = l.style
78                    r = (-offset * settings.dir / 2) + l.rot * settings.dir            
79                    transform = 'rotate(' + r + 'deg)';
80                        
81                    style.position = 'absolute';
82                    style.left = '50%';
83                    style.marginLeft = -(l.offsetWidth / 2) / fs + 'em';
84
85                    style.webkitTransform = transform;
86                    style.MozTransform = transform;
87                    style.OTransform = transform;
88                    style.msTransform = transform;
89                    style.transform = transform;
90
91                    style.webkitTransformOrigin = origin;
92                    style.MozTransformOrigin = origin;
93                    style.OTransformOrigin = origin;
94                    style.msTransformOrigin = origin;
95                    style.transformOrigin = origin;
96                    if(settings.dir === -1) {
97                        style.bottom = 0;
98                    }
99                }
100                
101                if (settings.fitText) {
102                    if (typeof($.fn.fitText) !== 'function') {
103                        console.log('FitText.js is required when using the fitText option');
104                    } else {
105                        $(elem).fitText();
106                        $(window).resize(function () {
107                            updateHeight();
108                        });
109                    }
110                }    
111                updateHeight();
112            };
113            
114            var getBounds = function (elem) {
115                var docElem = document.documentElement,
116                    box = elem.getBoundingClientRect();
117                return {
118                    top: box.top + window.pageYOffset - docElem.clientTop,
119                    left: box.left + window.pageXOffset - docElem.clientLeft,
120                    height: box.height
121                };
122            };        
123            
124            var updateHeight = function () {
125                var mid = getBounds(letters[center]),
126                    first = getBounds(letters[0]),
127                    h;
128                if (mid.top < first.top) {
129                    h = first.top - mid.top + first.height;
130                } else {
131                    h = mid.top - first.top + first.height;
132                }
133                elem.style.height = h + 'px';  
134            }
135
136            if (settings.fluid && !settings.fitText) {
137                $(window).resize(function () {
138                    layout();
139                });
140            }    
141
142            if (document.readyState !== "complete") {
143                elem.style.visibility = 'hidden';
144                $(window).load(function () {
145                    elem.style.visibility = 'visible';
146                    layout();
147                });
148            } else {
149                layout();
150            }
151        });
152    };
153})(jQuery);
154
155

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.