1
0
mirror of https://github.com/nikolaydubina/calendarheatmap.git synced 2025-01-20 21:18:34 +02:00

nit: typo

This commit is contained in:
Nikolay 2020-07-11 17:31:58 +08:00
parent 4cee5a2bc9
commit 3626667636
3 changed files with 13 additions and 13 deletions

View File

@ -59,7 +59,7 @@ type HeatmapConfig struct {
BoxSize int
Margin int
TextWidthLeft int
TextHightTop int
TextHeightTop int
TextColor color.RGBA
BorderColor color.RGBA
}
@ -67,8 +67,8 @@ type HeatmapConfig struct {
// NewHeatmap creates image with heatmap and additional elements
func NewHeatmap(conf HeatmapConfig) image.Image {
width := conf.TextWidthLeft + numWeekCols*(conf.BoxSize+conf.Margin)
height := conf.TextHightTop + 7*(conf.BoxSize+conf.Margin)
offset := image.Point{X: conf.TextWidthLeft, Y: conf.TextHightTop}
height := conf.TextHeightTop + 7*(conf.BoxSize+conf.Margin)
offset := image.Point{X: conf.TextWidthLeft, Y: conf.TextHeightTop}
img := image.NewRGBA(image.Rect(0, 0, width, height))
draw.Draw(img, img.Bounds(), &image.Uniform{color.White}, image.ZP, draw.Src)
@ -82,7 +82,7 @@ func NewHeatmap(conf HeatmapConfig) image.Image {
visitors,
&MonthSeparatorVisitor{
Img: img,
MinY: conf.TextHightTop,
MinY: conf.TextHeightTop,
MaxY: height - conf.Margin,
Margin: conf.Margin,
BoxSize: conf.BoxSize,

View File

@ -43,7 +43,7 @@ func TestBasicData(t *testing.T) {
Margin: 3,
BoxSize: 15,
TextWidthLeft: 35,
TextHightTop: 20,
TextHeightTop: 20,
TextColor: color.RGBA{100, 100, 100, 255},
BorderColor: color.RGBA{200, 200, 200, 255},
})
@ -60,7 +60,7 @@ func TestBasicData(t *testing.T) {
Margin: 3,
BoxSize: 15,
TextWidthLeft: 35,
TextHightTop: 20,
TextHeightTop: 20,
TextColor: color.RGBA{100, 100, 100, 255},
BorderColor: color.RGBA{200, 200, 200, 255},
})
@ -77,7 +77,7 @@ func TestBasicData(t *testing.T) {
Margin: 3,
BoxSize: 15,
TextWidthLeft: 35,
TextHightTop: 20,
TextHeightTop: 20,
TextColor: color.RGBA{100, 100, 100, 255},
BorderColor: color.RGBA{200, 200, 200, 255},
})
@ -94,7 +94,7 @@ func TestBasicData(t *testing.T) {
Margin: 3,
BoxSize: 15,
TextWidthLeft: 35,
TextHightTop: 20,
TextHeightTop: 20,
TextColor: color.RGBA{100, 100, 100, 255},
BorderColor: color.RGBA{200, 200, 200, 255},
})
@ -111,7 +111,7 @@ func TestBasicData(t *testing.T) {
Margin: 3,
BoxSize: 15,
TextWidthLeft: 35,
TextHightTop: 20,
TextHeightTop: 20,
TextColor: color.RGBA{100, 100, 100, 255},
BorderColor: color.RGBA{200, 200, 200, 255},
})
@ -128,7 +128,7 @@ func TestBasicData(t *testing.T) {
Margin: 3,
BoxSize: 15,
TextWidthLeft: 35,
TextHightTop: 20,
TextHeightTop: 20,
TextColor: color.RGBA{100, 100, 100, 255},
BorderColor: color.RGBA{200, 200, 200, 255},
})
@ -145,7 +145,7 @@ func TestBasicData(t *testing.T) {
Margin: 3,
BoxSize: 15,
TextWidthLeft: 35,
TextHightTop: 20,
TextHeightTop: 20,
TextColor: color.RGBA{100, 100, 100, 255},
BorderColor: color.RGBA{200, 200, 200, 255},
})
@ -162,7 +162,7 @@ func TestBasicData(t *testing.T) {
Margin: 3,
BoxSize: 15,
TextWidthLeft: 35,
TextHightTop: 20,
TextHeightTop: 20,
TextColor: color.RGBA{100, 100, 100, 255},
BorderColor: color.RGBA{200, 200, 200, 255},
})

View File

@ -80,7 +80,7 @@ func main() {
Margin: 3,
BoxSize: 15,
TextWidthLeft: 35,
TextHightTop: 20,
TextHeightTop: 20,
TextColor: color.RGBA{100, 100, 100, 255},
BorderColor: color.RGBA{200, 200, 200, 255},
})