HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: /var/www/javaapp.co.uk/wp-content/plugins/elementskit-lite/widgets/init/assets/js/animate-circle.js
const animateCircle=t=>{const{percentage:e,onScroll:c,speed:o,element:i,size:n,background_clr:a,color:r,stroke_width:h}=t,l=Math.ceil(document.body.scrollHeight-window.innerHeight);let s=i[0];ctx=s.getContext("2d"),s.width=2*n+h,s.height=2*n+h;let d=s.width/2,x=s.height/2,g=0;const m=t=>{(c?(g=Math.floor(t/l*360),Math.floor(t/l*100)):(g+=o)/360*100)<=e?(ctx.clearRect(0,0,s.width,s.height),ctx.beginPath(),ctx.lineWidth=h,ctx.arc(d,x,n,0,2*Math.PI),ctx.strokeStyle=a,ctx.stroke(),ctx.closePath(),ctx.beginPath(),ctx.lineWidth=h,ctx.strokeStyle=r,ctx.arc(d,x,n,0,2*Math.PI/360*g),ctx.stroke(),ctx.closePath(),c||requestAnimationFrame(m)):c||cancelAnimationFrame(m)};c||requestAnimationFrame(m),c&&(m(window.pageYOffset),document.addEventListener("scroll",(()=>{const t=Math.ceil(window.pageYOffset);m(t)})))};