thooyork / thooclock Goto Github PK
View Code? Open in Web Editor NEWjQuery analogue AlarmClock Plugin
License: MIT License
jQuery analogue AlarmClock Plugin
License: MIT License
Hi,
for world clocks next to each other it would be nice to also see the date of the timezone.
Thank you for this library!
hi
is thare a way to auto stop the alarm like after a minut
If I call multiple times then it launches multiple instances, but I only want once instance of the clock running
$('#myclock').thooClock({})
I then try to call $('#myclock').remove()
before calling the above but it doesnt show the clock
Is there a way to deal with this please?
Why daylight saving time not added in this clock.
Is it possible to add another separate script [daylight saving Js file].
Hi
Congratulation for your beautifull clock !
I've noticed that the alarm hand doe not disapear when the alarm time is over.
I've neither found any method to remove it, once displayed.
Would it be possible to add a (externally callable) method to simply remove the alarm hand ,
or a method to unset the alarm (when set) that also remove her alarm hand.
As my Javascript drawing understanding is near zero, I may be missed something.
Thanks
Hi again
I read the MIT license included in your source code, but as I'm not an expert in this field, would please just tell me if I could include your javascript file in phpMydomo, which is itself a free opensource HomeAutomation software.
http://www.phpmydomo.org/
Cheers
Thanks for the nice analog clock. I would like to add a small part of code for anyone who want to integrate moment.js and set a timezone.
On function startClock(x,y), replace this code:
theDate = new Date();
s = theDate.getSeconds();
mins = theDate.getMinutes();
m = mins + (s/60);
hours = theDate.getHours();
With this one:
var continent='Europe'
var city='London'
theDate = moment();
theDate.tz(continent+"/"+city).format();
s = theDate.seconds();
mins = theDate.minutes();
m = mins + (s/60);
hours = theDate.hour();
Make sure you call this 2 libraries:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.13/moment-timezone-with-data.min.js"></script>
After instantiating the thooClock, is it possible to set the dialBackgroundColor to another color on the onEverySecond() function?
This is not an issue may be you can consider as a feature request
It is really cool library, I was able to show clock very quickly but now I want to move it's hour and minutes hand similar to this website:
https://www.roomrecess.com/Tools/InteractiveClock/play.html
I'm able to click on canvas but not sure how access that specific line stroke
$('#canvas').click(function(e){
console.log('Canvas clicked');
});
Can anyone please help me with this.
Thanks in advance.
Is it possible to set an image/image background for hour/minute/second hands instead of single-color?
Thanks for the development of this great watch! It works like a charm.
I would like to adjust the time in 15 minute increments to support all time zones. While most time zones differ from Coordinated Universal Time (UTC) by a number of full hours, there are also a few time zones with both 30-minute and 45-minute offsets (e.g. India).
Is it anyhow possible?
Hi,
Great work and thanks for this clock !
It works great, but I have however noticed that with timezones that are over 9 hours offset, the hourCorrection
is not working properly.
This issue can be reproduced with an hourCorrection
of 12 (Pacific/Nauru for example).
The problem lies within the function numberCorrection
on line 340 :
function numberCorrection(num){
if(num !== '+0' && num !== ''){
if(num.charAt(0) === '+'){
//addNum
return + num.charAt(1);
}
else{
//subNum
return - num.charAt(1);
}
}
else{
return 0;
}
}
This will return 1 instead of 12.
Fix would be to replace num.charAt(1)
with num.substr(1)
to return the correct number.
I ve seen in the startClock function that the script initialize the date:
theDate = new Date();
I try to manually change this date but the clock is not running. Is it possible to initialize the clock with specified date ?
I worked a bit on to get the client timezone with JavaScript and send it to the server to get the appropriate hour correction. But the time can be wrong if the client time is not well set.
Any suggestion ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.