From 7625421a51a51ab7a16f55a39e1fde93028a4d1b Mon Sep 17 00:00:00 2001 From: Erik Andresen Date: Tue, 25 Jul 2023 23:35:32 +0200 Subject: [PATCH] widclkscrl: draw without args --- apps/widclkscrl/widget.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/widclkscrl/widget.js b/apps/widclkscrl/widget.js index 910108da5..292d291ac 100644 --- a/apps/widclkscrl/widget.js +++ b/apps/widclkscrl/widget.js @@ -16,14 +16,14 @@ pos: 10, dir: -1, eventHandlerSet: false, - draw: function(_w, scroll) { + draw: function() { if (!this.eventHandlerSet) { Bangle.on('lock', (on) => { this.run(!on); }); this.eventHandlerSet = true; } - if (scroll) { + if (this.text) { const buf = Graphics.createArrayBuffer(WIDTH,24,1,{msb:true}).setFont("Teletext5x9Ascii:1x2").setFontAlign(-1, 0); buf.drawString(this.text, this.pos, 12); @@ -50,7 +50,7 @@ if (!Bangle.CLOCK && on && !this.interval) { this.text = getDateText(); this.interval = setInterval(() => { - this.draw(this, true); + this.draw(); }, 100); this.width = WIDTH+2; Bangle.drawWidgets(); } else if (!on && this.interval) {