Skip to content

Commit

Permalink
fix dimension problem
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Mar 14, 2019
1 parent dffff28 commit 931582b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/util/dom-geom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function computeViewportRect(): Rect {

export function computeHeightAndMargins(el: HTMLElement) {
let computed = window.getComputedStyle(el)
return el.offsetHeight +
return el.getBoundingClientRect().height +
parseInt(computed.marginTop, 10) +
parseInt(computed.marginBottom, 10)
}
Expand Down

0 comments on commit 931582b

Please sign in to comment.