You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be a simple refactor to move to Apache Annotator, but I'm also wondering what we might learn for informing Apache Annotator's code (or "pitch") for existing projects using the dom-anchor- libraries directly.
The text was updated successfully, but these errors were encountered:
This indeed looks like an occasion to taste your own dog food. :)
In such a case I like to try refactor the code to make it look the way I feel it should be; then if that mismatches what is actually provided, update the library to make it work. (or tweak both to settle in between, and perhaps add library documentation to explain why it is not following the intuition you had as a consumer).
As of yet, Annotator lacks support for TextPosition selectors, but this may be a good moment to add it; I opened an issue for that.
For TextQuote selectors, you could swap in Annotator’s implementation, at the cost of losing the fuzzy string matching feature until we get that implemented.
I see your highlighter uses the wrap-range-text; this module does nearly exactly the same as Annotator’s highlighter (in fact, if I knew about that module, I might not even have written ours!). Should be easy to swap out.
@Treora and/or @tilgovi would love your thoughts on this upgrade/move.
The current selector creation code uses the
dom-anchor-
libraries directly:https://github.com/BigBlueHat/page-notes/blob/master/src/annotate.js#L9-L17
The highlight code currently only uses the
dom-anchor-text-position
toRange stuff:https://github.com/BigBlueHat/page-notes/blob/master/src/highlighter.js#L29
It should be a simple refactor to move to Apache Annotator, but I'm also wondering what we might learn for informing Apache Annotator's code (or "pitch") for existing projects using the
dom-anchor-
libraries directly.The text was updated successfully, but these errors were encountered: