-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -311,7 +311,13 @@ class View { | |
if (this.#column) { | ||
const side = this.#vertical ? 'height' : 'width' | ||
const otherSide = this.#vertical ? 'width' : 'height' | ||
const contentSize = this.#contentRange.getBoundingClientRect()[side] | ||
const contentRect = this.#contentRange.getBoundingClientRect() | ||
const rootRect = this.document.documentElement.getBoundingClientRect() | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
johnfactotum
Author
Owner
|
||
// offset caused by column break at the start of the page | ||
// which seem to be supported only by WebKit and only for horizontal writing | ||
const contentStart = this.#vertical ? 0 | ||
: this.#rtl ? rootRect.right - contentRect.right : contentRect.left - rootRect.left | ||
const contentSize = contentStart + contentRect[side] | ||
const pageCount = Math.ceil(contentSize / this.#size) | ||
const expandedSize = pageCount * this.#size | ||
this.#element.style.padding = '0' | ||
|
you use this.document here but a few lines below you have if (this.document)