@file-viewer/docx 0.3.35 → 0.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docx-preview.mjs
CHANGED
|
@@ -10016,6 +10016,8 @@ class HtmlRenderer {
|
|
|
10016
10016
|
const rect = child.getBoundingClientRect();
|
|
10017
10017
|
bottom = Math.max(bottom, rect.bottom);
|
|
10018
10018
|
if (child.tagName.toLowerCase() == "article") {
|
|
10019
|
+
if (rect.bottom > bodyBottom + tolerance)
|
|
10020
|
+
return true;
|
|
10019
10021
|
for (const block of Array.from(child.children)) {
|
|
10020
10022
|
const blockRect = block.getBoundingClientRect();
|
|
10021
10023
|
bottom = Math.max(bottom, blockRect.bottom);
|
|
@@ -10200,7 +10202,7 @@ class HtmlRenderer {
|
|
|
10200
10202
|
getPageBodyBottom(page) {
|
|
10201
10203
|
const lists = Array.from(page.children).filter(node => node.dataset.docxNoteList);
|
|
10202
10204
|
const view = page.ownerDocument?.defaultView;
|
|
10203
|
-
if (!
|
|
10205
|
+
if (!view)
|
|
10204
10206
|
return page.getBoundingClientRect().bottom;
|
|
10205
10207
|
let bottom = this.getPageNoteBottom(page);
|
|
10206
10208
|
for (const list of lists) {
|