mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-22 06:49:51 -04:00
Add methods for clearing selections
This commit is contained in:
1 parent
ac4e3962df
commit
1fef33731f
2 files changed
+7
No files matched your search
@@ -653,6 +653,10 @@ export class Paginator {
|
||||
const $style = this.#styleMap.get(this.#view?.document)
|
||||
if ($style) $style.textContent = style
|
||||
}
|
||||
deselect() {
|
||||
const sel = this.#view.document.defaultView.getSelection()
|
||||
sel.removeAllRanges()
|
||||
}
|
||||
async #setAnchor(anchor, select) {
|
||||
this.#anchor = anchor
|
||||
await this.#scrollToAnchor(select)
|
||||
|
||||
Reference in new issue
Block a user