mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-24 22:59:51 -04:00
Replace deselect with more general content access method
This commit is contained in:
1 parent
edea003b2f
commit
57ab79d598
3 files changed
+13
-13
No files matched your search
+4
-7
@@ -792,12 +792,13 @@ export class Paginator extends HTMLElement {
|
||||
const index = this.sections.findLastIndex(section => section.linear !== 'no')
|
||||
return this.goTo({ index })
|
||||
}
|
||||
getOverlayer() {
|
||||
if (this.#view) return {
|
||||
getContents() {
|
||||
if (this.#view) return [{
|
||||
index: this.#index,
|
||||
overlayer: this.#view.overlayer,
|
||||
doc: this.#view.document,
|
||||
}
|
||||
}]
|
||||
return []
|
||||
}
|
||||
setStyle(styles) {
|
||||
const $$styles = this.#styleMap.get(this.#view?.document)
|
||||
@@ -809,10 +810,6 @@ export class Paginator extends HTMLElement {
|
||||
$style.textContent = style
|
||||
} else $style.textContent = styles
|
||||
}
|
||||
deselect() {
|
||||
const sel = this.#view.document.defaultView.getSelection()
|
||||
sel.removeAllRanges()
|
||||
}
|
||||
destroy() {
|
||||
this.#observer.unobserve(this)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user