Posted 25 January 2023, 2:04 am EST
Hi,
The team infromed us that this is not a bug The sheet has zoom, and the getRowHeight API will return the original row height in the data model, but the getCellRect is used for the rendering.
So, changing part of the code to below will solve the problem
[code]let getHeight = (row, sheetArea) => {
let zoom = sheet.zoom();
sheetArea = sheetArea || GC.Spread.Sheets.SheetArea.viewport;
return Math.floor(sheet.getRowHeight(row) * zoom);
};
let pre = document.querySelector(“#pre”);
let top =
spread.getHost().offsetTop
+ getHeight(0)
+ getHeight(1)
+ getHeight(2)
+ getHeight(0, GC.Spread.Sheets.SheetArea.colHeader);
pre.style.top = top + "px";
pre.style.height = getHeight(3) + "px";[/code]
Regards,
Avinash