Skip to content

Commit

Permalink
remove seccond hand
Browse files Browse the repository at this point in the history
  • Loading branch information
nainemom committed Jun 1, 2023
1 parent 69667db commit 9645cef
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/C:/Windows/system/components/Taskbar/ClockWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,8 @@

<script>
export default {
data() {
return {
clockTimer: null,
};
},
mounted() {
this.drawClock();
this.clockTimer = setInterval(this.drawClock, 1000);
},
beforeUnmount() {
clearInterval(this.clockTimer);
},
methods: {
drawClock() {
Expand Down Expand Up @@ -72,7 +63,7 @@ export default {
const now = new Date();
let hour = now.getHours();
let minute = now.getMinutes();
let second = now.getSeconds();
const second = now.getSeconds();
// hour
hour %= 12;
hour = ((hour * Math.PI) / 6)
Expand All @@ -83,8 +74,8 @@ export default {
minute = ((minute * Math.PI) / 30) + ((second * Math.PI) / (30 * 60));
this.drawHand(ctx, minute, radius * 0.8, radius * 0.07);
// second
second = ((second * Math.PI) / 30);
this.drawHand(ctx, second, radius * 0.9, radius * 0.02);
// second = ((second * Math.PI) / 30);
// this.drawHand(ctx, second, radius * 0.9, radius * 0.02);
},
drawHand(ctx, pos, length, width) {
ctx.beginPath();
Expand Down

0 comments on commit 9645cef

Please sign in to comment.