From cd4ed235fa3cdbf7df980c3757413d686b369b34 Mon Sep 17 00:00:00 2001 From: Chiel Hackman Date: Fri, 9 Dec 2016 22:21:07 +0100 Subject: [PATCH] Changed mins into hours in const hour --- 02 - JS + CSS Clock/index-FINISHED.html | 2 +- 02 - JS + CSS Clock/index.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/02 - JS + CSS Clock/index-FINISHED.html b/02 - JS + CSS Clock/index-FINISHED.html index d4cb3b56a8..70bce0e085 100644 --- a/02 - JS + CSS Clock/index-FINISHED.html +++ b/02 - JS + CSS Clock/index-FINISHED.html @@ -85,7 +85,7 @@ minsHand.style.transform = `rotate(${minsDegrees}deg)`; const hour = now.getHours(); - const hourDegrees = ((mins / 12) * 360) + 90; + const hourDegrees = ((hours / 12) * 360) + 90; hourHand.style.transform = `rotate(${hourDegrees}deg)`; } diff --git a/02 - JS + CSS Clock/index.html b/02 - JS + CSS Clock/index.html index 1c777557da..d89afa0618 100644 --- a/02 - JS + CSS Clock/index.html +++ b/02 - JS + CSS Clock/index.html @@ -84,8 +84,8 @@ const minsDegrees = ((mins / 60) * 360) + 90; minsHand.style.transform = `rotate(${minsDegrees}deg)`; - const hour = now.getMinutes(); - const hourDegrees = ((mins / 12) * 360) + 90; + const hour = now.getHours(); + const hourDegrees = ((hours / 12) * 360) + 90; hourHand.style.transform = `rotate(${hourDegrees}deg)`; }