fix(market-depth): orderbook row height calculation (#3068)

This commit is contained in:
Bartłomiej Głownia 2023-03-06 11:21:45 +01:00 committed by GitHub
parent 7b8d814724
commit a65ee358ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,9 +88,9 @@ const getRowsToRender = (
return selectedRows;
};
// 17px of row height plus 5px gap
export const gridGap = 5;
export const rowHeight = 22;
// 17px of row height plus 4px gap
export const gridGap = 4;
export const rowHeight = 21;
// top padding to make space for header
const headerPadding = 30;
// bottom padding to make space for footer
@ -393,7 +393,8 @@ export const Orderbook = ({
numberOfRows * rowHeight +
headerPadding +
footerPadding +
-viewportHeight
-viewportHeight -
gridGap
)
);
if (scrollTopRef.current !== priceCenterScrollOffset) {