summaryrefslogtreecommitdiff
path: root/ext/fg/js/source.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-08-02 18:59:35 -0400
committerGitHub <noreply@github.com>2020-08-02 18:59:35 -0400
commit1184320e3e0863c86238a68bc90dc77b3355e332 (patch)
tree1b3a88b211cb6d23b1f0119816d4a124f03f34c6 /ext/fg/js/source.js
parentbdcdf9b1f5430760be605a7a5e84440e324de7b5 (diff)
Button and image scanning (#705)
* Update TextSourceElement.equals check to match TextSourceRange.equals * Force full query to be visible when scanning buttons or images with more text * Update style of query parser
Diffstat (limited to 'ext/fg/js/source.js')
-rw-r--r--ext/fg/js/source.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/fg/js/source.js b/ext/fg/js/source.js
index 38810f07..70f14179 100644
--- a/ext/fg/js/source.js
+++ b/ext/fg/js/source.js
@@ -32,6 +32,14 @@ class TextSourceRange {
this.imposterSourceElement = imposterSourceElement;
}
+ get startOffset() {
+ return this.range.startOffset;
+ }
+
+ get endOffset() {
+ return this.range.endOffset;
+ }
+
clone() {
return new TextSourceRange(this.range.cloneRange(), this.content, this.imposterContainer, this.imposterSourceElement);
}
@@ -230,8 +238,7 @@ class TextSourceElement {
other instanceof TextSourceElement &&
this._element === other.element &&
this._fullContent === other.fullContent &&
- this._startOffset === other.startOffset &&
- this._endOffset === other.endOffset
+ this._startOffset === other.startOffset
);
}