[annotator-dev] [h-dev] JavaScript Anchoring Utility Libraries
Nick Stenning
nickstenning at hypothes.is
Tue Jul 14 13:37:01 UTC 2015
On 13 Jul 2015, at 20:10, Randall Leeds wrote:
>
> Fragment Selector: https://github.com/hypothesis/dom-anchor-fragment
> Text Position Selector:
> https://github.com/hypothesis/dom-anchor-text-position
> Text Quote Selector: https://github.com/hypothesis/dom-anchor-text-quote
>
> All of these have been published on npm as alpha versions, which means you
> have to specify the version explicitly when installing them for now.
>
> I would appreciate any feedback on these and I hope that they are useful
> for implementations or discussion.
I've had a look through all three of these, and overall I think they look great! Simple, nice. Lovely.
Only one question and a couple of comments:
- what's the basis for the 32 character prefix/suffix for TextQuoteAnchor? I'm sure it's fine but regardless of whether it is a magic number of there's more to it, it should be a constant, not inlined in a couple of places through the code.
- a handful of judiciously placed comments would help with code comprehension -- particularly in the TextPositionAnchor and to a lesser extent the TextQuoteAnchor code.
- couple of minor typos (link syntax) in the dom-anchor-text-position README.
-N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150714/7b078ed9/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150714/7b078ed9/attachment-0004.sig>
More information about the annotator-dev
mailing list