From 7328cfa1a731fa5d7737a1e4485764d8b7cafe32 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 17 Mar 2024 12:13:54 +0100 Subject: [PATCH] Revert changes to timerclk --- apps/lint_exemptions.js | 4 ++-- apps/timerclk/ChangeLog | 1 + apps/timerclk/alarm.js | 6 +++--- apps/timerclk/metadata.json | 2 +- apps/timerclk/timer.js | 6 +++--- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/lint_exemptions.js b/apps/lint_exemptions.js index 5564b113a..83ab5cc02 100644 --- a/apps/lint_exemptions.js +++ b/apps/lint_exemptions.js @@ -183,7 +183,7 @@ module.exports = { ] }, "timerclk/timer.js": { - "hash": "f44702e61ad833b53fb28d222ff0fbd77d0307c6eb69c5ecebb8626a1cb20ed4", + "hash": "3b70606f1742b34bf4769f6e8703144ff0c3ba401a3a21f97ddcab5432c94db5", "rules": [ "no-unused-vars", "no-undef" @@ -197,7 +197,7 @@ module.exports = { ] }, "timerclk/alarm.js": { - "hash": "6f521742cc6a6d6f215e499084a596ffc3494d1e1f950b204368c051a18773de", + "hash": "3c280b0858d43f10b12947e5ae939c6825a620e6cb3687c6a7549c1a000b6241", "rules": [ "no-unused-vars", "no-undef" diff --git a/apps/timerclk/ChangeLog b/apps/timerclk/ChangeLog index 4712a061d..509eaa639 100644 --- a/apps/timerclk/ChangeLog +++ b/apps/timerclk/ChangeLog @@ -4,3 +4,4 @@ 0.04: Use 'modules/suncalc.js' to avoid it being copied 8 times for different apps 0.05: Improve responsiveness and detection of swipes on main clock screen 0.06: Minor code improvements +0.07: Fix regression in 0.06 diff --git a/apps/timerclk/alarm.js b/apps/timerclk/alarm.js index 764e8ce1b..4acaa6cf0 100644 --- a/apps/timerclk/alarm.js +++ b/apps/timerclk/alarm.js @@ -18,7 +18,7 @@ var editIndex = 0; var drawInterval; var drawIntervalTimeout; var buttons; -//var dragBorderHrsMins=0, dragBorderMinsSecs=0; +var dragBorderHrsMins=0, dragBorderMinsSecs=0; function update() { if (drawInterval) clearInterval(drawInterval); @@ -103,8 +103,8 @@ function draw() { else if (editIndex == 1) x = start + g.stringMetrics(timeStr[0]+":"+timeStr[1]+":"+timeStr[2]).width - markerPosChange; else x = 0; if (x) g.drawString("__", x, y); - //dragBorderHrsMins = start+g.stringMetrics(timeStr[0]).width+g.stringMetrics(":").width/2; - //dragBorderMinsSecs = start+g.stringMetrics(timeStr[0]+":"+timeStr[1]).width+g.stringMetrics(":").width/2; + dragBorderHrsMins = start+g.stringMetrics(timeStr[0]).width+g.stringMetrics(":").width/2; + dragBorderMinsSecs = start+g.stringMetrics(timeStr[0]+":"+timeStr[1]).width+g.stringMetrics(":").width/2; } if (all.length == 0) { diff --git a/apps/timerclk/metadata.json b/apps/timerclk/metadata.json index aef45f3fc..ae6968aca 100644 --- a/apps/timerclk/metadata.json +++ b/apps/timerclk/metadata.json @@ -2,7 +2,7 @@ "id": "timerclk", "name": "Timer Clock", "shortName":"Timer Clock", - "version": "0.06", + "version": "0.07", "description": "A clock with stopwatches, timers and alarms build in.", "icon": "app-icon.png", "type": "clock", diff --git a/apps/timerclk/timer.js b/apps/timerclk/timer.js index 5ca2fba3e..25052e6ae 100644 --- a/apps/timerclk/timer.js +++ b/apps/timerclk/timer.js @@ -18,7 +18,7 @@ var editIndex = 0; var drawInterval; var drawIntervalTimeout; var buttons; -//var dragBorderHrsMins=0, dragBorderMinsSecs=0; +var dragBorderHrsMins=0, dragBorderMinsSecs=0; function update() { if (drawInterval) clearInterval(drawInterval); @@ -128,8 +128,8 @@ function draw() { else if (editIndex == 1) x = start + g.stringMetrics(timeStr[0]+":"+timeStr[1]+":"+timeStr[2]).width - markerPosChange; else x = 0; if (x) g.drawString("__", x, y); - //dragBorderHrsMins = start+g.stringMetrics(timeStr[0]).width+g.stringMetrics(":").width/2; - //dragBorderMinsSecs = start+g.stringMetrics(timeStr[0]+":"+timeStr[1]).width+g.stringMetrics(":").width/2; + dragBorderHrsMins = start+g.stringMetrics(timeStr[0]).width+g.stringMetrics(":").width/2; + dragBorderMinsSecs = start+g.stringMetrics(timeStr[0]+":"+timeStr[1]).width+g.stringMetrics(":").width/2; } if (all.length == 0) {