Skip to content

Commit

Permalink
fix: add a day to the rotation calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
khawarizmus committed Feb 19, 2023
1 parent db635e0 commit f018bd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<template>
<div>
Component Playground
<Moon
show-guide
:moon-degree="moonDeg"
:moon-size="moonSize"
:line-weight="borderWidth"
/>
<Moon show-guide :moon-size="moonSize" :line-weight="borderWidth" />
<div class="absolute bottom-0 w-full">
<h2 class="my-3 text-xl font-semibold">Configuration</h2>
<div class="flex mb-3 align-middle">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Moon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ const daysTextLength = computed(() => {
const rotation = computed(() =>
props.moonDegree || props.moonDegree === 0
? props.moonDegree
: (temporalDate.day * 360) / temporalDate.daysInMonth
: (temporalDate.day * 360) / (temporalDate.daysInMonth + 1)
);
const moonDeg = computed(() => `${rotation.value}deg`);
Expand Down

0 comments on commit f018bd6

Please sign in to comment.