Closed reckart closed 3 years ago
After a brief look, I think the quote is only used in a few places to sort annotations by length. (In order to determine the top-most annotation on click.) This, obviously can be done with TextPosition alone, too.
Would you be up for a pull request on this one?
Incoming...
I did a PR with a quick fix. A better fix would probably be to move fetching the length entirely into the annotation object and then the annotation can use either the position or the quote to calculate the length - depending on what is available - and the code that sorts by length no longer has to worry about how to calculate the length.
Many thanks! I agree, length would ideally be a property/method of the annotation. But this works well for now :-)
I would like to be able to use RecogitoJS without having to send a TextQuoteSelector which would create a lot of unnecessary data between client and server especially for long ranges. If there is a TextPositionSelector, it should be enough. Unfortunately, the current code won't work without a TextQuoteSelector: