clock: fix transparency on no location
@@ -121,7 +121,7 @@ class Clock extends React.Component {
}
initGeolocation() {
- if (typeof this.props.data === 'string') {
+ if (false && typeof this.props.data === 'string') {
const latlon = this.props.data.split(',');
const lat = latlon[0];
const lon = latlon[1];
@@ -192,6 +192,17 @@ class Clock extends React.Component {
const newX = cx + (ctr - 15) * Math.cos(this.angle);
const newY = cy + (ctr - 15) * Math.sin(this.angle);
+ // Center white circle with time and date
+ circle(
+ ctx,
+ ctr,
+ ctr,
+ ctr,
+ -1,
+ 2 * Math.PI,
+ background
+ );
+
// Day
degArc(
ctx,
@@ -321,30 +332,18 @@ class Clock extends React.Component {
1
);
- /*
// Outer borders
- circleOutline(
+ circle(
ctx,
ctr,
ctr,
- ctr,
+ ctr/1.85,
-1,
2 * Math.PI,
background,
1
);
- */
- // Center white circle with time and date
- circle(
- ctx,
- ctr,
- ctr,
- ctr/1.85,
- -1,
- 2 * Math.PI,
- background
- );
// Center white circle border
circleOutline(
ctx,
