From 6090b453c337b318496879707aa09564536b035b Mon Sep 17 00:00:00 2001 From: Richard de Boer Date: Sun, 19 Jun 2022 20:00:18 +0200 Subject: [PATCH 1/2] 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"; From 9fb3fccb320638ac465d0acdc1073e53846fa06d Mon Sep 17 00:00:00 2001 From: Richard de Boer Date: Sun, 19 Jun 2022 20:00:54 +0200 Subject: [PATCH 2/2] ClockFace: minor cleanup No idea how that `true` got there, but it does nothing. --- modules/ClockFace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ClockFace.js b/modules/ClockFace.js index cd014887b..25b278846 100644 --- a/modules/ClockFace.js +++ b/modules/ClockFace.js @@ -108,7 +108,7 @@ ClockFace.prototype.resume = function() { delete this._last; this.paused = false; if (this._resume) this._resume.apply(this); - this.tick(true); + this.tick(); }; /**