Fix SVG Y-axis: 0:00 at bottom now correct
This commit is contained in:
1 parent
056a2e63fc
commit
bc44687735
1 file changed
+2
-2
+2
-2
@@ -338,9 +338,9 @@
|
||||
}
|
||||
|
||||
function angleForTime(date) {
|
||||
// 0:00 = bottom (-90°), 12:00 = top (90°), 24:00 = bottom (-90°)
|
||||
// 0:00 = bottom, 6:00 = left, 12:00 = top, 18:00 = right
|
||||
var hours = date.getHours() + date.getMinutes() / 60;
|
||||
return ((hours / 24) * 360 - 90) * Math.PI / 180;
|
||||
return ((hours / 24) * 360 + 90) * Math.PI / 180;
|
||||
}
|
||||
|
||||
function pointOnCircle(date, radius) {
|
||||
|
||||
Reference in new issue
Block a user