diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-18 08:11:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 13:11:47 +0000 |
commit | cfc65c31313731dfa0d36c2eceaca35e9d50992f (patch) | |
tree | ec96ec7ab1c3dae559fe5d7930c186347fb64a25 /ext/js/accessibility | |
parent | 6cf38229b54efbbc3ae7bc174c3999f9dfa7b1d2 (diff) |
Refactor DocumentUtil (#706)
* Refactor DocumentUtil
* Isolate suppression
Diffstat (limited to 'ext/js/accessibility')
-rw-r--r-- | ext/js/accessibility/google-docs-util.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/js/accessibility/google-docs-util.js b/ext/js/accessibility/google-docs-util.js index 31ae5982..f3f800fd 100644 --- a/ext/js/accessibility/google-docs-util.js +++ b/ext/js/accessibility/google-docs-util.js @@ -16,7 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import {DocumentUtil} from '../dom/document-util.js'; +import {computeZoomScale, isPointInAnyRect} from '../dom/document-util.js'; import {TextSourceRange} from '../dom/text-source-range.js'; /** @@ -126,7 +126,7 @@ export class GoogleDocsUtil { */ _getRangeWithPoint(textNode, x, y, normalizeCssZoom) { if (normalizeCssZoom) { - const scale = DocumentUtil.computeZoomScale(textNode); + const scale = computeZoomScale(textNode); x /= scale; y /= scale; } @@ -137,7 +137,7 @@ export class GoogleDocsUtil { const mid = Math.floor((start + end) / 2); range.setStart(textNode, mid); range.setEnd(textNode, end); - if (DocumentUtil.isPointInAnyRect(x, y, range.getClientRects())) { + if (isPointInAnyRect(x, y, range.getClientRects())) { start = mid; } else { end = mid; |