mirror of https://github.com/espruino/BangleApps
cogclock: Support Bangle.js 2
Very tight, but it looks acceptable with hidden widgets. Not defaulting the settingto hiding widgets though, to avoid code clutter.pull/2711/head
parent
d8ba658769
commit
d2875ba38b
|
@ -2,3 +2,4 @@
|
||||||
0.02: Use ClockFace library, add settings
|
0.02: Use ClockFace library, add settings
|
||||||
0.03: Use ClockFace_menu.addSettingsFile
|
0.03: Use ClockFace_menu.addSettingsFile
|
||||||
0.04: Hide widgets instead of not loading them at all
|
0.04: Hide widgets instead of not loading them at all
|
||||||
|
0.05: Support Bangle.js 2
|
||||||
|
|
|
@ -44,7 +44,7 @@ const clock = new ClockFace({
|
||||||
precision: 1,
|
precision: 1,
|
||||||
settingsFile: "cogclock.settings.json",
|
settingsFile: "cogclock.settings.json",
|
||||||
init: function() {
|
init: function() {
|
||||||
this.r1 = 84; // inner radius
|
this.r1 = (process.env.HWVERSION>1) ? 68 : 84; // inner radius
|
||||||
this.r3 = Math.min(Bangle.appRect.w/2, Bangle.appRect.h/2); // outer radius
|
this.r3 = Math.min(Bangle.appRect.w/2, Bangle.appRect.h/2); // outer radius
|
||||||
this.r2 = (this.r1*3+this.r3*2)/5;
|
this.r2 = (this.r1*3+this.r3*2)/5;
|
||||||
this.teeth = 12;
|
this.teeth = 12;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"id": "cogclock",
|
"id": "cogclock",
|
||||||
"name": "Cog Clock",
|
"name": "Cog Clock",
|
||||||
"version": "0.04",
|
"version": "0.05",
|
||||||
"description": "A cross-shaped clock inside a cog",
|
"description": "A cross-shaped clock inside a cog",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"screenshots": [{"url":"screenshot.png"}],
|
"screenshots": [{"url":"screenshot_b1.png"},{"url":"screenshot_b2.png"}],
|
||||||
"type": "clock",
|
"type": "clock",
|
||||||
"tags": "clock",
|
"tags": "clock",
|
||||||
"supports": ["BANGLEJS"],
|
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||||
"allow_emulator": true,
|
"allow_emulator": true,
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"cogclock.app.js","url":"app.js"},
|
{"name":"cogclock.app.js","url":"app.js"},
|
||||||
|
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
Loading…
Reference in New Issue