Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"author": "Scott Bedard",
"contributors": [
"Eric Weidow (https://github.com/studsministern)"
],
"bugs": {
"url": "https://github.com/scottbedard/svelte-heatmap/issues"
"url": "https://github.com/studsministern/svelte-heatmap/issues"
},
"description": "A light weight and customizable version of GitHub's contribution graph",
"devDependencies": {
Expand All @@ -22,7 +25,7 @@
"src",
"dist"
],
"homepage": "https://github.com/scottbedard/svelte-heatmap",
"homepage": "https://github.com/studsministern/svelte-heatmap",
"keywords": [
"svelte"
],
Expand All @@ -32,7 +35,7 @@
"name": "svelte-heatmap",
"repository": {
"type": "git",
"url": "git+https://github.com/scottbedard/svelte-heatmap.git"
"url": "git+https://github.com/studsministern/svelte-heatmap.git"
},
"svelte": "src/index.js",
"scripts": {
Expand All @@ -42,5 +45,5 @@
"watch": "rollup -c -w"
},
"unpkg": "dist/index.umd.min.js",
"version": "1.0.2"
"version": "1.0.3"
}
8 changes: 4 additions & 4 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}, ${fontSize})`}>
{#each chunks as chunk, index}
<Week
cellRadius={cellRadius}
Expand Down Expand Up @@ -115,14 +115,14 @@ $: 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 + monthLabelHeight + fontSize // <- max of 6 rows in monthly view
: weekRect + monthLabelHeight + fontSize;

$: width = view === 'monthly'
? ((weekRect + monthGap) * chunks.length) - monthGap
: (cellRect * chunks.length) - cellGap + dayLabelWidth;

$: dayLabelPosition = index => {
return (cellRect * index) + (cellRect / 2) + monthLabelHeight;
return (cellRect * index) + (cellRect / 2) + monthLabelHeight + fontSize;
}
</script>
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}, ${fontSize})`}>
{#each days as day}
<Cell
color={day.color}
Expand Down