diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index 1b1e689..403926c 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -33,13 +33,16 @@ tags: sections: true, overlay: false }; - this.parts = this.#createContext(['background', 'hands']); + this.parts = []; this.shapes = []; this.#init(); } #init() { + this.#createContext(['background', 'hands']); + this.createOverlay(); + 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)`); @@ -309,13 +312,11 @@ tags: canvas.width = canvas.offsetWidth; wrap.appendChild(canvas); - parts.push({name: name, element: canvas, context: canvas.getContext('2d')}); + this.parts.push({name: name, element: canvas, context: canvas.getContext('2d')}); }); this.element.appendChild(wrap); - parts.push({name: 'wrap', element: wrap}); - - return parts; + this.parts.push({name: 'wrap', element: wrap}); } createOverlay() { @@ -334,7 +335,8 @@ tags: left: '0px', height: '100%', width: '100%', - // display: this.options.overlay ? 'flex' : 'none', + display: this.options.overlay ? 'flex' : 'none', + // display: 'flex', justifyContent: 'center', alignItems: 'center', backgroundColor: `rgba(0, 0, 0, .6)`,