1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 17:20:50 +00:00
This commit is contained in:
astaxie 2016-09-15 11:11:34 +08:00
parent 2b7dd85b92
commit c16507607c

View File

@ -359,6 +359,9 @@ func (m *Image) calculateSizes(width, height, ncount int) {
}
// Calculate dot size.
m.dotSize = int(nh / fh)
if m.dotSize < 1 {
m.dotSize = 1
}
// Save everything, making the actual width smaller by 1 dot to account
// for spacing between digits.
m.numWidth = int(nw) - m.dotSize