From bffb5d6b41f409258a2f0c126a04127f31e28a06 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 13 Jun 2021 14:38:01 +0800 Subject: make the caller of `getRowHeight` function adapt row number change, update comment: use rows number instead of rows index. --- col.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'col.go') 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. -- cgit v1.2.1