Skip to content

Commit

Permalink
fix scottbedard#144, month labels not rendering on firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
Studsministern committed Mar 31, 2023
1 parent 8df4dcb commit 6a2c436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/SvelteHeatmap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</text>
{/each}
{/if}
<g transform={`translate(${dayLabelWidth})`}>
<g transform={`translate(${dayLabelWidth}, ${monthLabelHeight})`}>
{#each chunks as chunk, index}
<Week
cellRadius={cellRadius}
Expand Down Expand Up @@ -115,8 +115,8 @@ $: chunks = view === 'monthly'
$: weekRect = (7 * cellRect) - cellGap;
$: height = view === 'monthly'
? (6 * cellRect) - cellGap + monthLabelHeight // <- max of 6 rows in monthly view
: weekRect + monthLabelHeight;
? (6 * cellRect) - cellGap + (2 * monthLabelHeight) // <- max of 6 rows in monthly view
: weekRect + (2 * monthLabelHeight);
$: width = view === 'monthly'
? ((weekRect + monthGap) * chunks.length) - monthGap
Expand Down
2 changes: 1 addition & 1 deletion src/views/Month.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<g transform={`translate(${translation}, 0)`}>
<g transform={`translate(${translation}, ${monthLabelHeight})`}>
{#each days as day}
<Cell
color={day.color}
Expand Down

0 comments on commit 6a2c436

Please sign in to comment.