Refactor
This commit is contained in:
parent
41d4665e49
commit
969ccac690
24 changed files with 236 additions and 287 deletions
11
src/framework/helper/get-height.ts
Normal file
11
src/framework/helper/get-height.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export const getHeight = (e: HTMLElement): number => {
|
||||
const computedStyle = window.getComputedStyle(e);
|
||||
return (
|
||||
// ignores margin collapse
|
||||
e.clientHeight +
|
||||
parseInt(computedStyle.marginTop) +
|
||||
parseInt(computedStyle.marginBottom) +
|
||||
parseInt(computedStyle.borderTopWidth) +
|
||||
parseInt(computedStyle.borderBottomWidth)
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue