1
0
Fork 0
master
Richard Hopkins 2020-05-11 11:27:08 +01:00
parent b96e6ad416
commit d76f3e859d
1 changed files with 3 additions and 3 deletions

View File

@ -6,9 +6,6 @@
const locale = require('locale'); const locale = require('locale');
let timer = null; let timer = null;
let currentDate = new Date(); let currentDate = new Date();
const centerX = Math.round(g.getWidth() / 2);
const centerY = widgetHeight + Math.round((g.getHeight()-widgetHeight) / 2);
const radius = Math.round(Math.min(g.getWidth()/2,(g.getHeight()-widgetHeight) / 2));
const cirRad = 2*Math.PI; const cirRad = 2*Math.PI;
const proportion = 0.3; // relative size of hour hand const proportion = 0.3; // relative size of hour hand
const thickness = 4; // thickness of decorative lines const thickness = 4; // thickness of decorative lines
@ -22,6 +19,9 @@ else {
widgetHeight = 0;} widgetHeight = 0;}
const colours = ["green","red","blue","80s"]; const colours = ["green","red","blue","80s"];
const colour = colours[settings.colour]; const colour = colours[settings.colour];
const centerX = Math.round(g.getWidth() / 2);
const centerY = widgetHeight + Math.round((g.getHeight()-widgetHeight) / 2);
const radius = Math.round(Math.min(g.getWidth()/2,(g.getHeight()-widgetHeight) / 2));
const drawSegment = (params) => { const drawSegment = (params) => {
angle1 = params.start/360*cirRad; angle1 = params.start/360*cirRad;