feat: More private methods for HippieClock
This commit is contained in:
parent
d0fde7cc6a
commit
91df239a42
1 changed files with 5 additions and 5 deletions
|
|
@ -33,10 +33,10 @@ tags:
|
|||
this.parts = this.#createContext(['background', 'hands']);
|
||||
this.shapes = [];
|
||||
|
||||
this.init();
|
||||
this.#init();
|
||||
}
|
||||
|
||||
init() {
|
||||
#init() {
|
||||
this.addRing('seconds', 1, 21, 60, `rgb(250, 216, 3)`);
|
||||
this.addRing('minutes', .9, 46, 60, `rgb(242, 175, 19)`);
|
||||
this.addRing('hours', .8, 6, this.options.h24 ? 24 : 12, `rgb(211, 10, 81)`);
|
||||
|
|
@ -47,14 +47,14 @@ tags:
|
|||
this.addRing('month', .3, 10, 12, `rgb(107, 199, 217)`);
|
||||
this.addRing('moon', .2, 4, 8, `rgb(82, 190, 209)`);
|
||||
|
||||
this.resize();
|
||||
window.addEventListener('resize', () => this.resize());
|
||||
this.#resize();
|
||||
window.addEventListener('resize', () => this.#resize());
|
||||
|
||||
console.debug(this);
|
||||
console.debug(this.getTime());
|
||||
}
|
||||
|
||||
resize() {
|
||||
#resize() {
|
||||
this.parts.forEach(part => {
|
||||
this.updateOptions({size: Math.floor(this.getSize().value * 0.9)})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue