Giter Site home page Giter Site logo

georapbox / canvas-circular-countdown Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 8.0 822 KB

Draw a configurable circular canvas countdown timer.

Home Page: https://georapbox.github.io/canvas-circular-countdown/

License: MIT License

JavaScript 100.00%
html5-canvas progress-bar countdown-timer circularprogressbar

canvas-circular-countdown's Issues

Override time ticking (elapsedTime)

Hey there,
First of all - thanks for making this library and hitting the nail right in the head.

My requirement

A server maintains the duration and elapsed time. I use sockets to sync with it.
Long story short, I have a duration and elapsedTime which is maintained outside of canvas-circular-countdown. I want canvas-circular-countdown to use the elapsedTime which I provide.

Possible ways to solve this

  1. Add another Option called time which contains the remaining time (pass by reference). Use it simply to display. Or...
  2. Expose a method in instance called "setTime". That way we could use setTime whenever the server timer changes.

Open to more solutions.

Possibility to configure elapsed time

Hi everyone,

I have a situation where a circular counter is shown to explain the user the time he has to complete a form. If the user suubmit the form and there are some server validation errors, the page is re render and I would like to start the circular countdown again but with the elapsed time instead of creating a countdown with less duration.

As far as I see in the code, there is an easy way to add it as configuration and pass it to the Timer class instead to always assign this._time with 0. What do you think? Would you accept a PR with that?

Browser is laggy after a longtime the site are open

I would be interested to know if the canvas element can slow down the browser after a certain time?
Especially when multiple timers are running at the same time?

Since I installed the timer plugin, the website becomes very sluggish after a while, so that the scroll bars can no longer be moved back and forth smoothly and the scrolling is also messy.

I can imagine that canvas is responsible for this and is “garbaging” the server.

maybe you have any idea or a solution to clean it up?

Thank you and best regards.

onTimerRunning don't work when tab is not active

Hello,

as first let me say you have do a nice Script here, i like it ! =)

But i have a little problem, your timer is anymore running when the tab is anymore in focus.
That is a problem then il added a tick-function on onTimerRunning, so when timer is done it will play an alert sound.

But the tab need to be still active to run the tick-function, this is a big problem.
is it a native problem of canvas or on your script?

I would be very much happy if you can help/fix.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.