clocks
Now, the clocks actually function, and store data in local storage. You can also create new clocks with the createClock function, which has 3 arguments. parentId is the HTML id of the parent element to put the clock into, put it as “clock-grid” normally. id is the string that clock represents. Currently, they have no prefix, which means quite a few ids (albeit unusual) such as heritage-flex cannot be used as clock names even though they aren’t clocks. I plan to add a backend prefix to clock ids later. Last is size, which is either 4,6, or 8. This is the size of the clock. The increment/decrement buttons call my buttonUpdate function, but slightly modified. They pretend to have an id one more or less than the current value, so that it goes up or down by one. It can also overflow and underflow (intentionally), which makes resetting full clocks a breeze. I hope to soon add a frontend way of adding clocks, instead of the console.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.