Comments (13)
You can call a rebuild, so:
$(window).resize(function(){
$("#timer").TimeCircles().rebuild();
});
from timecircles.
That was quick!
That works, but it doesn't always size accurately. I tried adding it to a smartresize function and it seems to be working a bit better, but the fonts don't seem to want to scale with the circle.
from timecircles.
If it doesn't always size accurately, that sounds like a bug (A friend reported something similar). I'll have a look at this.
from timecircles.
please let us know, if the responsive thing works! thanks
from timecircles.
Can you show me an example of it not working as it should? I have a test set up here:
http://git.wimbarelds.nl/TimeCircles/test/
Where it seems to work perfectly.
from timecircles.
I did add the extra javascript line and the circles are responsively perfect, but there is a minor issue, when I resize webpage manually, the circles are flickering (or kind of twinkling). It may not a big deal, but its a little bit annoying.
from timecircles.
Ahh, if it's only the TimeCircles flickering- that's because the resize call is executed very very often! So it's resizing the TimeCircles possibly a hundred times in a second. That's going to cause some rendering issues/flickering.
What you should ideally do is use something to either throttle the function call.
If you're not opposed to adding a javascript library, then I can really recommend "underscore js" (http://underscorejs.org/)
Add the following:
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
And change the javascript to:
$(window).resize(_.throttle(function(){
tc.rebuild();
}, 500));
from timecircles.
will try that later, but i doubt that we gonna let me add new js libraries.
thanks for help, i really appreciate.
from timecircles.
It's possible to create such a function yourself, just google for javascript throttle script. Underscore is simply a (pretty great) library that has that functionality out of the box.
from timecircles.
javascript throttle script it is! Thanks
from timecircles.
Since there has been no further comments or questions, I assume this has been resolved now. If not, feel free to post further questions / reopen.
from timecircles.
how can I make it responsive with css media quary?
I want to show 4 circle in large screen and 2 circle in medium screen and one circle in small screen.
from timecircles.
when resize, there is error inside console and timecircles did not responsive.. any help ?
error :
tq
from timecircles.
Related Issues (20)
- Call a angular function from a timecircle listener
- timecircles cancels a timeout set outside of it
- Counter Clockwise change second color
- How to change the color of canvas during the counterclockwise
- Can not initialize plugin in Bootstrap 4 modal popup
- Text label for when the date/hour/minutes reach singular state
- Circle direction rtl HOT 1
- Radialfade function
- timecircles is not a function HOT 3
- Cpu Performance
- Customized outer and round progress bars
- Start-time from server HOT 2
- Change of color of the text HOT 1
- How to make counter not reset on page refresh
- After changing data-date="2011-01-01 00:00:00" dynamically, how to start timer again with this new updated date. HOT 1
- How to change timecircle to square
- More than 60 minutes countdown HOT 2
- center
- Circle Background Color Option Doesn't Work
- Site Not loading
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timecircles.