From 6090b453c337b318496879707aa09564536b035b Mon Sep 17 00:00:00 2001 From: Richard de Boer Date: Sun, 19 Jun 2022 20:00:18 +0200 Subject: [PATCH] ClockFace: don't erase widgets when using `draw` If a clock specifies `draw` but not `update`, we create our own `update`, but it should only erase the clock area, not the whole screen. --- modules/ClockFace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ClockFace.js b/modules/ClockFace.js index f8dc33287..cd014887b 100644 --- a/modules/ClockFace.js +++ b/modules/ClockFace.js @@ -19,7 +19,7 @@ function ClockFace(options) { options.update.apply(this, [t, {d: true, h: true, m: true, s: true}]); }); this.update = options.update || (t => { - g.clear(); + g.clearRect(Bangle.appRect); options.draw.apply(this, [t, {d: true, h: true, m: true, s: true}]); }); if (options.precision===1000||options.precision===60000) throw "ClockFace precision is in seconds, not ms";