1(function($) { 2 "use strict"; 3 4 UNCODE.magneticCursor = function(){ 5 function magneticCursor($wrap){ 6 $wrap = typeof $wrap === 'undefined' ? $('body') : $wrap; 7 var $magnetics = $wrap.find('.tmb-image-anim-magnetic .t-entry-visual').has('img:not(.avatar), .t-background-cover, .dummy.secondary-dummy-image, .t-secondary-background-cover').add($('.magnetic').has('.background-inner, .header-bg')); 8 9 $magnetics.on('mousemove', function(e){ 10 var $this = $(this), 11 $el, 12 bound = e.currentTarget.getBoundingClientRect(), 13 coeff = 30, 14 hor = (bound.width / 2) - (e.clientX - bound.left), 15 ver = (bound.height / 2) - (e.clientY - bound.top), 16 toX = hor / bound.width * coeff, 17 toY = ver / bound.height * coeff, 18 scaleX = ((bound.width + coeff + 5) / bound.width).toFixed(2), 19 scaleY = ((bound.height + coeff + 5) / bound.height).toFixed(2), 20 toScale = Math.max(scaleX, scaleY); 21 22 if ( $this.hasClass('magnetic') ) { 23 $el = $('.background-inner, .header-bg', $this); 24 } else { 25 $el = $('img:not(.avatar), .t-background-cover, .fluid-object, .dummy.secondary-dummy-image, .t-secondary-background-cover', $this); 26 } 27 28 gsap.killTweensOf($el); 29 gsap.to( $el, { 30 duration: 0.75, 31 x: toX, 32 y: toY, 33 scale: toScale, 34 ease: Power1.easeOut, 35 transformPerspective: 900, 36 transformOrigin: 'center', 37 force3D: true 38 }); 39 }).on('mouseout', function(e){ 40 var $this = $(this), 41 $el 42 if ( $this.hasClass('magnetic') ) { 43 $el = $('.background-inner, .header-bg', $this); 44 } else { 45 $el = $('img:not(.avatar), .t-background-cover, .fluid-object, .dummy.secondary-dummy-image, .t-secondary-background-cover', $this); 46 } 47 gsap.killTweensOf($el); 48 gsap.to( $el, { 49 duration: 0.6, 50 y: 0, 51 x: 0, 52 scale: 1, 53 ease: Power1.easeOut, 54 transformPerspective: 900, 55 transformOrigin: 'center', 56 force3D: true 57 }); 58 }); 59 }; 60 61 $(window).on('load uncode-custom-cursor uncode-quick-view-loaded', function(event) { 62 magneticCursor(); 63 }); 64 65 $(document).ajaxComplete(function( event, xhr, settings ) { 66 magneticCursor(); 67 }); 68 69 $('.isotope-container').on('isotope-layout-complete', function() { 70 var $this = $(this); 71 magneticCursor($this); 72 }); 73 74}; 75 76 77})(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.