GithubHelp home page GithubHelp logo

thooclock's People

Contributors

krislao avatar soif avatar thooyork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

thooclock's Issues

Digits are very small on FireFox

The hours numbers on Firefox (mac, 35.0.1) are really small , ie:

firefox

While looking beautifull on Safari :

safari

Captures done with your vanilla install on both browsers.

tchusss

auto alarm atop

hi
is thare a way to auto stop the alarm like after a minut

License

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

Support for Half Hour and 45-Minute Time Zones

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?

Integrate momenet.js and Timezone - Solution

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>

Removing the alarm hand

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

Server time instead of client time

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 ?

How to drag/move hour and minutes hand

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.

muliple instances of clock

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?

Wrong hourCorrection

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.

Daylight Saving

Why daylight saving time not added in this clock.
Is it possible to add another separate script [daylight saving Js file].

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.