bug fixes, and performance improvements, and drawer
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
export const getComposerHeight = (
|
||||
scrollHeight: number,
|
||||
lineHeight: number,
|
||||
padding: number,
|
||||
borders: number,
|
||||
borderBox: boolean,
|
||||
): number => {
|
||||
const contentHeight = Math.min(Math.max(scrollHeight - padding, lineHeight * 2), lineHeight * 10);
|
||||
// A stable CSS-pixel boundary avoids 47.999… / 48.01 oscillations.
|
||||
return Math.round(contentHeight + (borderBox ? padding + borders : 0));
|
||||
};
|
||||
Reference in New Issue
Block a user