Hey guys. First, codepen! http://codepen.io/torgian/pen/qqjvXo
My biggest hurdle came with a timing problem. Essentially, whenever I clicked the “start” button, it would work as advertised, but if I clicked it to stop, then quickly clicked it again to start the clock, sometimes the previous cycle didn’t finish, so it would essentially be counting “double” seconds.
A friend of mine suggested using Moment.js to help. I studied that for a bit, read around, and then rewrote the timing portion of my program to be more concise, using Date objects, and finally got it working right.
Total hours spent on this project: about 15 or so. I also did some stuff with animation and such, but left that out. I’m using the pomodoro clock as a test bed for animation timings and stuff like that now.
Anyways, please take a look at my code! Suggest improvements! I know it’s kind of messy…