summaryrefslogtreecommitdiff
path: root/col.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-06-13 14:38:01 +0800
committerxuri <xuri.me@gmail.com>2021-06-13 14:38:01 +0800
commitbffb5d6b41f409258a2f0c126a04127f31e28a06 (patch)
treeb74428a7b8eb1fec5d53ba31c0212f7927522c15 /col.go
parente354db69b0bdd02357c221af9ef09695dd8fd122 (diff)
make the caller of `getRowHeight` function adapt row number change, update comment: use rows number instead of rows index.
Diffstat (limited to 'col.go')
-rw-r--r--col.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/col.go b/col.go
index e1ac5a5..2e3190c 100644
--- a/col.go
+++ b/col.go
@@ -592,9 +592,9 @@ func (f *File) positionObjectPixels(sheet string, col, row, x1, y1, width, heigh
}
// Subtract the underlying cell heights to find end cell of the object.
- for height >= f.getRowHeight(sheet, rowEnd) {
- height -= f.getRowHeight(sheet, rowEnd)
+ for height >= f.getRowHeight(sheet, rowEnd+1) {
rowEnd++
+ height -= f.getRowHeight(sheet, rowEnd)
}
// The end vertices are whatever is left from the width and height.