PageSourceSearch

https://www.illumeo.com/wp-content/themes/envolve/assets/js/jquery.circleType.js?ver=7.1.2

js illumeo.com collected 2026-09-24 11:17:24 UTC 4,977 bytes, 156 lines download raw bytes

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