mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Use bottom of rect to get height in textHeight
This commit is contained in:
parent
0adbb08dac
commit
589f27eb63
1 changed files with 1 additions and 6 deletions
|
@ -173,16 +173,11 @@ class Contents {
|
|||
let height;
|
||||
let range = this.document.createRange();
|
||||
let content = this.content || this.document.body;
|
||||
let border = borders(content);
|
||||
|
||||
range.selectNodeContents(content);
|
||||
|
||||
rect = range.getBoundingClientRect();
|
||||
height = rect.height;
|
||||
|
||||
if (height && border.height) {
|
||||
height += border.height;
|
||||
}
|
||||
height = rect.bottom;
|
||||
|
||||
return Math.round(height);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue